[jQuery] Re: selecting elements that match a regular expression

2009-09-16 Thread Macsig
Thanks guys lanxiazhi's solution works just fine. Have a good 1! Sig On Sep 16, 7:15 pm, Steven Black wrote: > Try James Padolsey's Regex Selector plugin for jQuery >  http://james.padolsey.com/javascript/regex-selector-for-jquery/ > > **--**  Steve > > On Sep 16, 9:34 pm, macsig wrote: >

[jQuery] Re: selecting elements that match a regular expression

2009-09-16 Thread Macsig
Thanks guys @lanxiazhi how do you implement getNum()? A simple split? Thanks again. Sig On Sep 16, 6:55 pm, lanxiazhi wrote: > Yes,you can do this. > $("[id*=wrap_]").click( >   function() >  { >     var id=$(this).attr("id"); >     var targetId="elem_"+getNum(id); >     $("#"+targetId).to

[jQuery] Re: selecting elements that match a regular expression

2009-09-16 Thread Steven Black
Try James Padolsey's Regex Selector plugin for jQuery http://james.padolsey.com/javascript/regex-selector-for-jquery/ **--** Steve On Sep 16, 9:34 pm, macsig wrote: > Hello guys, > is there a way to select elements that match a regular expression? > > I have a set of divs with id = "wrap_n" w

[jQuery] Re: selecting elements that match a regular expression

2009-09-16 Thread lanxiazhi
Yes,you can do this. $("[id*=wrap_]").click( function() { var id=$(this).attr("id"); var targetId="elem_"+getNum(id); $("#"+targetId).toggle(); } ); 2009/9/17 macsig > > Hello guys, > is there a way to select elements that match a regular expression? > > I have a set of divs with