GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Saturday, February 5, 2011

Counting Element

each function in jQuery used for count and iterate the whole object. Like this one:
(function($){
    $.fn.howMany = function(){
        var a = 0;
        this.each(function(){
            a = a + 1;
        });
        return a;
    };
})(jQuery);
Share/Bookmark

No comments:

Post a Comment