Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the selector to be executed every time, so that if new elements… #245

Merged
merged 1 commit into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow the selector to be executed every time, so that if new elements…
… have been inserted in the DOM, they are also included
  • Loading branch information
Boyan Mihaylov committed Jul 23, 2015
commit 21da55872358ff365471ac20fce2aefc336c6257
3 changes: 1 addition & 2 deletions src/js/jquery.swipebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
elements = [], // slides array [ { href:'...', title:'...' }, ...],
$elem,
selector = elem.selector,
$selector = $( selector ),
isMobile = navigator.userAgent.match( /(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i ),
isTouch = isMobile !== null || document.createTouch !== undefined || ( 'ontouchstart' in window ) || ( 'onmsgesturechange' in window ) || navigator.msMaxTouchPoints,
supportSVG = !! document.createElementNS && !! document.createElementNS( 'http://www.w3.org/2000/svg', 'svg').createSVGRect,
Expand Down Expand Up @@ -106,7 +105,7 @@
}

if ( relVal && relVal !== '' && relVal !== 'nofollow' ) {
$elem = $selector.filter( '[' + relType + '="' + relVal + '"]' );
$elem = $( selector ).filter( '[' + relType + '="' + relVal + '"]' );
} else {
$elem = $( selector );
}
Expand Down
Loading