Team:Warsaw/Team
From 2010.igem.org
(Difference between revisions)
Line 10: | Line 10: | ||
<html> | <html> | ||
- | < | + | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> |
- | + | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script> | |
- | + | <script type="text/javascript"> | |
- | padding: 10px 10px | + | $(document).ready(function(){ |
+ | var zindexnr = 1; | ||
+ | $(".foto").draggable({ | ||
+ | start: function(event, ui) { | ||
+ | zindexnr++; | ||
+ | var cssObj = { 'z-index' : zindexnr }; | ||
+ | $(this).css(cssObj); | ||
+ | } | ||
+ | }); | ||
+ | $(".foto").each(function(){ | ||
+ | var rot = Math.random()*30-15+'deg'; | ||
+ | var left = Math.random()*50+'px'; | ||
+ | var top = Math.random()*150+'px'; | ||
+ | $(this).css('-webkit-transform' , 'rotate('+rot+')'); | ||
+ | $(this).css('-moz-transform' , 'rotate('+rot+')'); | ||
+ | $(this).css('top' , left); | ||
+ | $(this).css('left' , top); | ||
+ | $(this).mouseup(function(){ | ||
+ | zindexnr++; | ||
+ | $(this).css('z-index' , zindexnr); | ||
+ | }); | ||
+ | }); | ||
+ | $(".foto").dblclick(function(){ | ||
+ | $(this).css('-webkit-transform' , 'rotate(0)'); | ||
+ | $(this).css('-moz-transform' , 'rotate(0)'); | ||
+ | }); | ||
+ | |||
+ | }); | ||
+ | </script> | ||
+ | <style type="text/css"> | ||
+ | img.foto | ||
+ | { | ||
+ | padding: 10px 10px 50px 10px; | ||
background: #eee; | background: #eee; | ||
border: 1px solid #fff; | border: 1px solid #fff; | ||
- | + | -moz-box-shadow: 0px 2px 15px #333; | |
+ | box-shadow: 0px 2px 15px #333; | ||
+ | -webkit-box-shadow: 0px 2px 15px #333; | ||
position: relative; | position: relative; | ||
- | + | margin:25px 0 0 15px; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | |||
- | + | </style> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
+ | <img class="foto" src="http://www.phawker.com/wp-content/uploads/2008/10/austin-powers-poster.jpg"/> | ||
</html> | </html> | ||
{{TemplateBottom}} | {{TemplateBottom}} |
Revision as of 15:08, 9 July 2010