Skip to content

Commit b71e653

Browse files
author
aj
committed
Fix for ajlkn#20
1 parent c3625ae commit b71e653

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

jquery.poptrox.js

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,10 @@
623623

624624
var x, tmp, a = $(this), i = a.find('img'), data = a.data('poptrox');
625625

626+
// Ignore? Skip.
627+
if (data == 'ignore')
628+
return;
629+
626630
// No href? Bail.
627631
if (!a.attr('href'))
628632
return;
@@ -743,9 +747,6 @@
743747

744748
switch (x.type) {
745749

746-
case 'ignore':
747-
break;
748-
749750
case 'iframe':
750751
x.object = $('<iframe src="" frameborder="0"></iframe>');
751752
x.object
@@ -847,24 +848,21 @@
847848
&& x.src.match(/^\/\//))
848849
x.src = 'http:' + x.src;
849850

850-
if (x.type != 'ignore')
851-
queue.push(x);
851+
queue.push(x);
852852

853853
i.attr('title', '');
854854

855+
a
856+
.attr('href', '')
857+
.css('outline', 0)
858+
.on('click', function(e) {
855859

856-
if (x.type != 'ignore')
857-
a
858-
.attr('href', '')
859-
.css('outline', 0)
860-
.on('click', function(e) {
860+
e.preventDefault();
861+
e.stopPropagation();
861862

862-
e.preventDefault();
863-
e.stopPropagation();
864-
865-
$popup.trigger('poptrox_open', [index]);
863+
$popup.trigger('poptrox_open', [index]);
866864

867-
});
865+
});
868866

869867
});
870868

0 commit comments

Comments
 (0)