Selectors are strings, including the special operators. So your select should look like this:
'this + h1'. What you have there just concatenates the two strings together making your selector 'thish1' cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: Warfang <warfang...@gmail.com> To: "jQuery (English)" <jquery-en@googlegroups.com> Date: 07/19/2009 01:11 AM Subject: [jQuery] Selector help I'm pretty new to Javascript/ jQuery, so this is really bugging me. I'm trying to get the height of an h1 that is a sibling to this. The value for the variable h1Height, however, returned as null in the console in Firebug. Perplexed, I tried console.logging ('this'+'+h1') to see what it was interpreted as. It brought back this+h1, which should select an h1 adjacent to this (which is a div). Javascript h1Height = $('this'+'h1').height(); What went wrong?
<<inline: graycol.gif>>
<<inline: ecblank.gif>>