javascript - Change variable value on scroll - jQuery -


i have variable: coords.zoom. i'm using value of coords.zoom set width , height of zoomed image, giving me magnification effect. , works great!

my problem don't know how increment (or decrement) value of variable, when user scrolls on image. need create function change value of variable on user scroll, nothing scrolling or down. variable between 1 , 3.

any ideas?

it code execute when document scrolled. , code execute in proper manner settimeout.

            var scrltimeout = null;             jquery(document)             .scroll(function(){             cleartimeout(scrltimeout);               scrltimeout = settimeout(             function(){             alert('document scrolled');             }, 300)              }); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -