diff options
author | Richard Worth <rdworth@gmail.com> | 2008-11-19 06:09:48 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-11-19 06:09:48 +0000 |
commit | 8306e62887be2bcc70984fd3b3b6c9d8158843cf (patch) | |
tree | 715b7150ab5154ca56fb9388e4bb4f51709a4c40 /demos/functional | |
parent | 027e4d57b7085a6f2a2135646d04f2510192c2b7 (diff) | |
download | jquery-ui-8306e62887be2bcc70984fd3b3b6c9d8158843cf.tar.gz jquery-ui-8306e62887be2bcc70984fd3b3b6c9d8158843cf.zip |
set svn:eol-style to native
Diffstat (limited to 'demos/functional')
-rw-r--r-- | demos/functional/templates/ui.effects.easing.ex2.html | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/demos/functional/templates/ui.effects.easing.ex2.html b/demos/functional/templates/ui.effects.easing.ex2.html index 9e7f1d66b..651ba18ab 100644 --- a/demos/functional/templates/ui.effects.easing.ex2.html +++ b/demos/functional/templates/ui.effects.easing.ex2.html @@ -1,19 +1,19 @@ -<div id="area" style="position: relative; width: 400px; height: 300px; border: 1px solid #bbb;">
- <img src="templates/images/white.gif" style="width: 400px; height: 300px;"/>
- <img id="target" src="templates/images/target.jpeg" style="position: absolute; left: 0px; top: 0px;"/>
-</div>
-<script type="text/javascript">
-function moveToHere(event, easing) {
- var area = $("#area");
- var target = $("#target");
- var offset = area.offset();
- var max = [area.width() - target.width(), area.height() - target.height()];
- var scroll = [document.documentElement.scrollLeft || document.body.scrollLeft,
- document.documentElement.scrollTop || document.body.scrollTop];
- target.animate({left: Math.max(0, Math.min((event.clientX + scroll[0]) -
- offset.left - (target.width() / 2), max[0])),
- top: Math.max(0, Math.min((event.clientY + scroll[1]) -
- offset.top - (target.height() / 2), max[1]))},
- 2000, easing);
-}
+<div id="area" style="position: relative; width: 400px; height: 300px; border: 1px solid #bbb;"> + <img src="templates/images/white.gif" style="width: 400px; height: 300px;"/> + <img id="target" src="templates/images/target.jpeg" style="position: absolute; left: 0px; top: 0px;"/> +</div> +<script type="text/javascript"> +function moveToHere(event, easing) { + var area = $("#area"); + var target = $("#target"); + var offset = area.offset(); + var max = [area.width() - target.width(), area.height() - target.height()]; + var scroll = [document.documentElement.scrollLeft || document.body.scrollLeft, + document.documentElement.scrollTop || document.body.scrollTop]; + target.animate({left: Math.max(0, Math.min((event.clientX + scroll[0]) - + offset.left - (target.width() / 2), max[0])), + top: Math.max(0, Math.min((event.clientY + scroll[1]) - + offset.top - (target.height() / 2), max[1]))}, + 2000, easing); +} </script>
\ No newline at end of file |