Permalink
Browse files

Switch to Brandon Aaron's Jquery mousewheel for compatibility with jq…

…1.7+ (https://github.com/brandonaaron/jquery-mousewheel).

Bump jq to 1.7 on demo, add github ribbon to demo.

Fixes #4
  • Loading branch information...
1 parent 0d6fd97 commit 0e3be099fe26280bc363a447ca41def744ee8ca2 @benlumley committed Dec 27, 2011
Showing with 5 additions and 4 deletions.
  1. +3 −2 example/index.html
  2. +2 −2 jquery-panzoom.js
View
@@ -3,9 +3,9 @@
<head>
<title>jQuery PanZoom Example - by Ben Lumley</title>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
- <script type="text/javascript" src="http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js"></script>
+ <script type="text/javascript" src="https://raw.github.com/brandonaaron/jquery-mousewheel/master/jquery.mousewheel.js"></script>
<script type="text/javascript" src="../jquery-panzoom.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<script type="text/javascript">
@@ -144,6 +144,7 @@
<p>Icons from <a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a>
</div>
</div>
+ <a href="https://github.com/benlumley/jQuery-PanZoom" target="_blank"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/71eeaab9d563c2b3c590319b398dd35683265e85/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub"></a>
</body>
</html>
View
@@ -289,10 +289,10 @@
// mousewheel
if (settings.mousewheel && typeof(this.mousewheel) == 'function') {
- this.parent().bind('wheel.panZoom', function(event, delta) { event.preventDefault(); $(this).find('img').panZoom('mouseWheel', delta) } );
+ this.parent().bind('mousewheel.panZoom', function(event, delta) { event.preventDefault(); $(this).find('img').panZoom('mouseWheel', delta) } );
data.bound_elements = data.bound_elements.add(this.parent());
} else if (settings.mousewheel) {
- alert('Mousewheel requires mousewheel from jQuery tools - please include jQuery tools or disable mousewheel to remove this warning.')
+ alert('Mousewheel requires jquery-mousewheel by Brandon Aaron (https://github.com/brandonaaron/jquery-mousewheel) - please include it or disable mousewheel to remove this warning.')
}
// direct form input

0 comments on commit 0e3be09

Please sign in to comment.