Created
May 22, 2011 15:39
-
-
Save tomykaira/985595 to your computer and use it in GitHub Desktop.
jQUI: New test for #4316.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>scaling test</title> | |
<script type="text/javascript" src="../../jquery-1.5.1.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.ui.draggable.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.effects.core.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.effects.scale.js"></script> | |
<script type="text/javascript" src="../../ui/jquery.ui.droppable.js"></script> | |
<script type="text/javascript"> | |
$(document).ready( function(){ | |
var options = { percent: 200, origin: ["bottom", "right"], scale:"content" } ; // replace to "middle", "center" | |
$("#trigger").click(function(){ | |
$(".scale").effect("scale", options , 1000); | |
}); | |
$('.scale').click(function() { | |
$(this).effect("scale", options, 1000); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<style type="text/css" media="screen"> | |
.scale { | |
padding: 5px; | |
background: #abcdef; | |
width: 100px; | |
height: 50px; | |
border: 10px solid black; | |
} | |
#absolute { | |
position: absolute; | |
top: 300px; | |
left: 300px; | |
} | |
#relative1 { | |
position: relative; | |
top: 0px; | |
left: 100px; | |
} | |
#relative2 { | |
position: relative; | |
} | |
#static { | |
} | |
#absolute_auto { | |
position: absolute; | |
top: auto; | |
left: auto; | |
} | |
#fixed { | |
position: fixed; /* error */ | |
top: 500px; | |
left: 500px; | |
} | |
#fixed_auto { | |
position: fixed; /* error */ | |
} | |
#right_bottom { | |
position: absolute; | |
bottom: 300px; | |
right: 300px; | |
} | |
#rel_right_bottom { | |
position: relative; | |
bottom: 30px; | |
right: 30px; | |
} | |
#margin { | |
margin: 50px ; | |
} | |
</style> | |
<button id="trigger">Start</button> | |
<div style="margin: 100px"> | |
<div id="static" class="scale">static</div> | |
<div id="static" class="scale">another static</div> | |
<div id="relative2" class="scale">relative2</div> | |
<div id="relative1" class="scale">relative1</div> | |
<div id="absolute_auto" class="scale">absolute auto</div> | |
<div id="absolute" class="scale">absolute</div> | |
<div id="fixed" class="scale">fixed</div> | |
<div id="fixed_auto" class="scale">fixed_auto</div> | |
<div id="right_bottom" class="scale">abs with right bottom</div> | |
<div id="rel_right_bottom" class="scale">rel with right bottom</div> | |
<div id="container" class="container"> | |
<div id="margin" class="scale">has margin</div> | |
</div> | |
<div id="scroller" style="height: 1000px;"></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment