[jQuery] Wildcards
[jQuery] Wildcards
<html>
<body>
Hello folks,
Can wildcards be used in the following context...
I change the ID of an "a" tag surrounding an icon (that when
clicked triggers a delete function) from its original setting of
"del" to a string containing info (pb, iA) about the item (to
be deleted) by:
<tt>
$("#del").id("del*"+pb+"*"+iA+"*ck");
</tt>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<tt> with "del"... eg.
$("#del??).id("del*"+pb+"*"+iA+"*ck");
</tt>so that I can subsequently change its ID to reflect the item I am
wanting to delete?
Thanks,
Bruce</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/