[jQuery] Re: trying to act on certain DIV's and not others

2008-11-27 Thread nibb42
David, Seasoup, Ricardo, thank you all so very much for taking the time, lots to go on, many thanks again. On Nov 27, 6:32 am, ricardobeat <[EMAIL PROTECTED]> wrote: > Use the attribute selector for this: > > $('something').click(function(){ >     $('[id*=contact').hide(); // *= means 'contains

[jQuery] Re: trying to act on certain DIV's and not others

2008-11-26 Thread ricardobeat
Use the attribute selector for this: $('something').click(function(){ $('[id*=contact').hide(); // *= means 'contains' }); see "Attribute Filters" at http://docs.jquery.com/Selectors But as seasoup said, there are better ways to structure your app. - ricardo On Nov 26, 2:18 pm, "[EMAIL PR

[jQuery] Re: trying to act on certain DIV's and not others

2008-11-26 Thread seasoup
I'm not sure exactly what it is you are trying to do, so can't answer with exact code but this code will make all divs have a click event that will hide all divs except the one you clicked on. $('div').click(function(){ $('div').not($(this)).hide(); }); Try thinking in terms of all of the sel

[jQuery] Re: trying to act on certain DIV's and not others

2008-11-26 Thread David Andrews
Hey Steve, I think regex is possible in the selector so using \\S* as your wildcard.. $('#contact_\\S*').each(); Sorry haven't tested the above - but hope it helps you out. Dave -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED