[jQuery] Re: Get help with wildCard selector

2009-09-13 Thread Steven Yang
i think what you want is
$('div[id^=abc-]').size()

$('#div[...') means id=div and something else but you dont have anything
with id = div

On Mon, Sep 14, 2009 at 11:30 AM, Conrad Cheng yfch...@gmail.com wrote:

 Dear all,
 I have certain div with below format
 div id=abc-01
 /div
 div id=abc-02
 /div
 div id=abc-03
 /div

 I want to get the no of div who contain abc-* and i have used the wildcard
 , but i seems not work for me...

 I have tired
 $('#div[id^=abc-]').size()

 Can anyone give some hints to me with many thanks!




[jQuery] Re: Get help with wildCard selector

2009-09-13 Thread Conrad Cheng
That's great, Thanks Steven.

On Mon, Sep 14, 2009 at 11:33 AM, Steven Yang kenshin...@gmail.com wrote:

 i think what you want is
 $('div[id^=abc-]').size()

 $('#div[...') means id=div and something else but you dont have anything
 with id = div

 On Mon, Sep 14, 2009 at 11:30 AM, Conrad Cheng yfch...@gmail.com wrote:

 Dear all,
 I have certain div with below format
 div id=abc-01
 /div
 div id=abc-02
 /div
 div id=abc-03
 /div

 I want to get the no of div who contain abc-* and i have used the wildcard
 , but i seems not work for me...

 I have tired
 $('#div[id^=abc-]').size()

 Can anyone give some hints to me with many thanks!