Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 11 years ago

#1323 closed bug (duplicate)

Namespace Attributes Selector Missing

Reported by: sosensible Owned by:
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:


You can call the attribute correctly like this...


but that doesn't return a collection of forms where the condition is true... and if you manually create an array that doesn't work with the jQuery each. The following would be a test case that should work. (Libraries like SPRY are using this technology and it SHOULD be with this release if possible.)


If another type of selectore or function cared for that it would be fine also... but this is definitely a missing feature in jQuery selectors and selectors are very much what makes jQuery great.

Change History (3)

comment:1 Changed 16 years ago by sosensible

Here is an example of a work around I found for others who may need one.

jQuery.fn.coopforms = function(){

var myForms = new Array(); jQuery('form').each(function(){

if(jQuery(this).attr("coop:manage")=="true") {

myForms[myForms.length] = this; coopformlist = jQuery.ListAppend(coopformlist,this.id);


}) return jQuery(myForms);


This will wrap your resulting array as a jQuery collection than can be chained like normal jQuery selectors.

comment:2 Changed 16 years ago by sosensible

jQuery.fn.coopforms = function() {

return this.filter(function(){

return jQuery(this).attr("coop:manage") == "true";



Dan and Mike helped me get this simpler. (Was missing the return on the outer level. Return on the inner side of the loop isn't enough!)

comment:3 Changed 16 years ago by john

Priority: blockermajor
Resolution: duplicate
Status: newclosed

Duplicate of #155.

Note: See TracTickets for help on using tickets.