Bruce MacKay schrieb:
> [...]
> This only "works" for the first iteration.  If I subsequently select 
> another item to be deleted, the ID of the "a" tag is no longer just 
> "del" and so obviously the ID of the a tag won't be changed because it 
> cannot be found.  Is there a way that I can use some type of wildcard 
> to find an element (and in this case there will only ever be a single 
> element) whose id begins with "del"... eg.
>
> $("#del??).id("del*"+pb+"*"+iA+"*ck");
>
> so that I can subsequently change its ID to reflect the item I am 
> wanting to delete?
Try to work with classes instead of IDs. You can add, remove and check 
for any amount of classes, avoiding the necessity for wildcards. Useful 
methods are addClass("someclass"), removeClass("someclass") and 
is(".someclass").

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to