Last active
December 21, 2015 15:28
-
-
Save callblueday/6326509 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<script type="text/javascript"> | |
var count = 10; | |
function Picture() | |
{ | |
if (event.wheelDelta >= 120) | |
Resize(++count); | |
else if (event.wheelDelta <= -120) | |
Resize(--count); | |
return false; | |
} | |
function Resize(c){ | |
oImage.style.zoom = c + '0%'; | |
} | |
</script> | |
</head> | |
<body> | |
<img id="oImage" src="Sample.png" alt="sample "onmousewheel="Picture()"> | |
</body> | |
</html> | |
http://msdn.microsoft.com/en-us/library/ie/ms536951(v=vs.85).aspx<html> | |
<head> | |
<script type="text/javascript"> | |
var count = 10; | |
function Picture() | |
{ | |
if (event.wheelDelta >= 120) | |
Resize(++count); | |
else if (event.wheelDelta <= -120) | |
Resize(--count); | |
return false; | |
} | |
function Resize(c){ | |
oImage.style.zoom = c + '0%'; | |
} | |
</script> | |
</head> | |
<body> | |
<img id="oImage" src="Sample.png" alt="sample "onmousewheel="Picture()"> | |
</body> | |
</html> | |
http://msdn.microsoft.com/en-us/library/ie/ms536951(v=vs.85).aspx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// other browsers mousewheel events
$(window).bind('mousewheel', function(event, delta, deltaX, deltaY) {
// if(document.body.offsetWidth >= 800 && !wait) {
if(!wait) {
wait = true;
if(delta < 0) {
//wheel down
whellDirection = 'down';
setPageDownEvent(area);
}
else {
//wheel up
whellDirection = 'up';
setPageUpEvent(area);
}
}
});