javascript - no run function jquery on mobile -
i have animation on scroll page in jquery, in mobile wired.
how can set-up jquery not show animation in mobile browser? tin main.js have other function want keep both browser.
if animation:
$(function() { var $elems = $('.animateblock'); var winheight = $(window).height(); var fullheight = $(document).height(); $(window).scroll(function() { animate_elems(); }); function animate_elems() { wintop = $(window).scrolltop(); $elems.each(function() { $elm = $(this); if ($elm.hasclass('animated')) { return true; } topcoords = $elm.offset().top; if (wintop > (topcoords - (winheight * .90))) { $elm.addclass('animated'); } }); } });
thanks!
Comments
Post a Comment