-
-
Save thriveweb/022a3ba55716dd5bdd49 to your computer and use it in GitHub Desktop.
This file contains 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
(function($){ | |
$.fn.killZoomy = function(){ | |
$(this) | |
//Unbinding any events attached | |
//be carefull not just zoomy functions | |
.removeClass('parent-zoom') | |
.unbind('click mousemove mouseover mouseleave') | |
//Removing inline style added inline from Zoomy | |
.attr('style', '') | |
.children('img') | |
.attr('style', '') | |
.siblings('.zoomy') | |
//Removing Zoomy no zoomBar in 1.3 and higher | |
.remove(); | |
//Test for touch | |
touch = (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) ? true : false; | |
if(touch){ | |
$('.zoom').unwrap(); | |
$('.zoomy-btn').remove(); | |
} | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment