Tried it again with this code...

jQuery.fn.j = function(){
   jQuery(this).filter(function(){
       return jQuery(this).attr("coop:manage") == "true";
   });
};

jQuery('form').j().each(function(){alert(jQuery(this).attr('id'))});

This is what I modified in an attempt to get it to work... and it isn't working. (Currently I have three forms and two should match.)

Tried this also...

jQuery.fn.jt = function(){
   jQuery(this).filter(function(){
       return jQuery(this).attr("coop:manage");
   });
};

jQuery('form').jt().each(function(){alert(jQuery(this).attr('id'))});

Firebug says on both occasions that....
jQuery("form").j() has no properties
jQuery("form").jt() has no properties

I am trying to make this part of a plugin library.

No... that fix didn't return a "collection" that is "chainable".

It certainly should, and it does for me.  With a test page that has
two forms the following alerts 2:

var j = $("form").filter(function(){
   return $(this).attr("coop:manage") == "true";
});
alert(j.size());

Mike


Reply via email to