Skip to content

Commit

Permalink
Made it possible to prefix customLink with ">", to make it work only …
Browse files Browse the repository at this point in the history
…for links within the slider.
  • Loading branch information
erik-krogh committed Feb 27, 2016
1 parent 760ba2d commit aab3364
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 40 deletions.
7 changes: 6 additions & 1 deletion js/jquery.sudoSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,12 @@
}

if (option[2]/*customlink*/) {
bindAndRegisterOff(doc, "click", customLinkClickHandler, option[2]/*customlink*/);
var filter = stringTrim(option[2]/*customlink*/);
if (stringTrim(filter).charAt(0) == ">") {
bindAndRegisterOff(obj, "click", customLinkClickHandler, filter.substr(1, filter.length));
} else {
bindAndRegisterOff(doc, "click", customLinkClickHandler, filter);
}
}

runOnImagesLoaded(getSlides(option[9]/*startslide*/, option[7]/*slidecount*/), TRUE, function () {
Expand Down
Loading

0 comments on commit aab3364

Please sign in to comment.