Skip to content

Instantly share code, notes, and snippets.

@gekh
Last active November 15, 2016 12:18
Show Gist options
  • Save gekh/be77797b77c308f0b11e49f8beea0d9a to your computer and use it in GitHub Desktop.
Save gekh/be77797b77c308f0b11e49f8beea0d9a to your computer and use it in GitHub Desktop.
Чтобы срабатывало на клик только по последнему элементу (jQuery)
jq_object.on('click', '.js-parent :not(.js-child-1, .js-child-2)', function(event) {
//your code
});
jq_object.on('click', '.js-child-1', function(event) {
//your code
});
jq_object.on('click', '.js-child-2', function(event) {
//your code
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment