This article mainly introduces jquery to create a custom selector to select a hyperlink with a height greater than 100, the example analyzes the use of jquery custom selector, very practical value, the need for friends can refer to the
The example in this article tells you how jquery creates a custom selector to select a hyperlink implementation method that is more than 100 high. Share to everyone for your reference. The specific analysis is as follows:
jquery Create a custom selector, the selector you define can actually be a function, the following JS code defines a over100pixels selector, select a link with a height greater than 100, this kind of technique is very practical
?
1 2 3 4 5 6 7 8 |
$.extend ($.expr[': '], {over100pixels:function (a) {return $ (a). Height () > 100;}}); $ ('. Box:over100pixels '). Click (function () {alert (' The element you clicked are over-pixels high '); |
I hope this article will help you with your jquery programming.