Last active
June 16, 2016 10:01
-
-
Save pixelbart/d4ff097e23316b13f8ee3796e7916d9d to your computer and use it in GitHub Desktop.
data-featherlight Attribut allen Links hinzufügen um sie in einer Lightbox zu öffnen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********** | |
* Fügt das data-featherlight attribut allen Bildlinks hinzu | |
* Plugin: https://github.com/noelboss/featherlight/ | |
**/ | |
$('a[href*=".png"], a[href*=".gif"], a[href*=".jpg"]').each(function() { | |
if (this.href.indexOf('?') < 0) { | |
$(this).attr('data-featherlight', 'image'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment