[jQuery] Re: Selector help for new user please

2007-07-28 Thread duggoff
Thanks! I had to change .children to .find, but then it worked great :) Doug On Jul 28, 1:51 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > Doug, > This should work, but untested: > > if($("div#sidebar2").children(".plugin").size() != 0{ > > $("div#sidebar2").css('width',160); > $("div#con

[jQuery] Re: Selector help for new user please

2007-07-28 Thread John Resig
That can be made much simpler: if ( $("div#sidebar2[div.plugin]").width(160).length ) $("div#content").css("marginRight", 170); --John On 7/28/07, Benjamin Sterling <[EMAIL PROTECTED]> wrote: > Doug, > This should work, but untested: > > if($("div#sidebar2").children(".plugin").size() != 0{ >

[jQuery] Re: Selector help for new user please

2007-07-28 Thread Benjamin Sterling
Doug, This should work, but untested: if($("div#sidebar2").children(".plugin").size() != 0{ $("div#sidebar2").css('width',160); $("div#content")css('marginRight', 170); } On 7/28/07, duggoff <[EMAIL PROTECTED]> wrote: > > > How would I turn this pseudocode into jquery? > > if div#sidebar2 con