Skip to content

Instantly share code, notes, and snippets.

@thriveweb
Forked from jcblw/killZoomy.js
Last active August 29, 2015 14:01
Show Gist options
  • Save thriveweb/022a3ba55716dd5bdd49 to your computer and use it in GitHub Desktop.
Save thriveweb/022a3ba55716dd5bdd49 to your computer and use it in GitHub Desktop.
(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