Skip to content

Commit

Permalink
Fixed recursion error for vclick and touchstart events
Browse files Browse the repository at this point in the history
  • Loading branch information
patheard committed Mar 20, 2013
1 parent 45c504b commit 1747316
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/js/workers/lightbox.js
Expand Up @@ -75,13 +75,8 @@
$.extend(opts, (typeof wet_boew_lightbox !== 'undefined' ? wet_boew_lightbox : {}), overrides, _pe.data.getData(elm, 'wet-boew'));

// Add touchscreen support for launching the lightbox
$lb = elm.find('.lb-item, .lb-gallery, .lb-hidden-gallery').on('vclick touchstart', function (e) {
if (e.stopPropagation) {
e.stopPropagation();
} else {
e.cancelBubble = true;
}
$(this).trigger('click');
$lb = elm.find('.lb-item, .lb-gallery, .lb-hidden-gallery').on('vclick touchstart', function () {
$.fn.colorbox.load();
});

// Build single images, inline content and AJAXed content
Expand Down

0 comments on commit 1747316

Please sign in to comment.