You could use either of these attribute selectors:

   - [EMAIL PROTECTED] an E element whose "foo" attribute value ends exactly
   with the string "bar"
   - [EMAIL PROTECTED] an E element whose "foo" attribute value contains the
   substring "bar"

So your query would look like this:

$('[EMAIL PROTECTED]')

I would add a tag name in the front for a little performance boost:

$('[EMAIL PROTECTED]')

You can find more info on those selectors here:
http://docs.jquery.com/DOM/Traversing/Selectors

--
Brandon Aaron

On 8/10/07, David Williams <[EMAIL PROTECTED]> wrote:
>
>
> Summary: I am new to JQuery.  Is it possible to search for a element
> by ID using a wildcard?  Something like this where "*" indicates a
> wildcard?
>   $('#*btnTest')
>
> Background:  I develop in ASP.Net.  The button in question exist in a
> user control, which when placed on a page modifies the generated input
> id to something like "usercontrol1_btnTest".  I could find new id and
> modify the jquerry, but then the jquery code would only work for that
> page.  It seems a better design would be to write the script so it was
> not dependant on the name of the page it lives on.
>
> I am open to other suggestions as how to make this happen.  I have not
> looked at using classes vs IDs, allthough the elements in question are
> already using classes.  I have not considered multiple classes
> though.  However where I am really going though is binding to a
> specifc (yes/no) radio button options (as genreated by a radio button
> control), so a unique class should not apply to each radio button
> option.
> Thanks.
>
>

Reply via email to