Create your own Selector

//extend the jQuery functionality $.extend($.expr[':'], { //name of your special selector moreThanAThousand : function (a){ //Matching element return parseInt($(a).html()) > 1000; } }); $(document).ready(function() { $('td:moreThanAThousand').css('background-color', '#ff0000'); });
This snippet allows you to extend jQuery in the shape of creating your own selector.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.