Wow fast responses to this group, I am impressed.  Thanks.
Brandon: Yes I used your second suggestion.  The full line binds a
click event to hide/show a span
            $('[EMAIL PROTECTED]').click(function() { $
('#spnShowHideDemo').toggle(); });

Karl: Yes you may correct about the size of the DOM being a concern.
Unforturnetly most of the page is a Usercontrol, which brings me back
to the same problem if I were to try to find a container first.
Hopefully it will not be too slow to be an issue.

On Aug 10, 11:22 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> 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.- Hide quoted text -
>
> - Show quoted text -

Reply via email to