Created
July 13, 2012 06:24
-
-
Save sapegin/3103107 to your computer and use it in GitHub Desktop.
Controls helper
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
/** | |
* Controls | |
* | |
* <span data-trigger="slider-next" data-recipient=".portfolio">Next</span> | |
*/ | |
$(document).click(function(e) { | |
var target = e.target; | |
if (target.getAttribute('data-trigger') && target.getAttribute('data-recipient')) { | |
target = $(target); | |
$(target.data('recipient')).trigger(target.data('trigger')); | |
e.preventDefault(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Но оба создают объект jQuery, который не создаётся в исходном варианте.