Skip to content

Commit bb67c0e

Browse files
committed
Add domCopy setting for DOM filter. Fix #118
1 parent 2e10559 commit bb67c0e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

js/jquery.nyroModal.filters.dom.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jQuery(function($, undefined) {
2020
load: function(nm) {
2121
nm.store.domEl = $(nm.store.link.sel);
2222
if (nm.store.domEl.length)
23-
nm._setCont(nm.store.domEl.contents());
23+
nm._setCont(nm.domCopy ? nm.store.domEl.html() : nm.store.domEl.contents());
2424
else
2525
nm._error();
2626
},
2727
close: function(nm) {
28-
if (nm.store.domEl && nm.elts.cont)
28+
if (!nm.domCopy && nm.store.domEl && nm.elts.cont)
2929
nm.store.domEl.append(nm.elts.cont.find('.nyroModalDom').contents());
3030
}
3131
}

js/jquery.nyroModal.js

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jQuery(function($, undefined) {
3434
galleryCounts: true, // Indicates if the gallery counts should be shown
3535
ltr: true, // Left to Right by default. Put to false for Hebrew or Right to Left language. Used in gallery filter
3636

37+
// Specific confirguation for DOM filter
38+
domCopy: false,
39+
3740
// Specific confirguation for image filter
3841
imageRegex: '[^\.]\.(jpg|jpeg|png|tiff|gif|bmp)\s*$', // Regex used to detect image link
3942

0 commit comments

Comments
 (0)