Created
June 11, 2013 16:45
-
-
Save wwgist/5758500 to your computer and use it in GitHub Desktop.
JQUERY: custom selector example
This file contains hidden or 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
$.extend($.expr[':'], { | |
over100pixels: function(a) { | |
return $(a).height() > 100; | |
} | |
}); | |
$('.box:over100pixels').click(function() { | |
alert('Элемент, который вы потревожили своим кликом, в высоту более 100 пикселов'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment