Yes! its working fine thanks ! But I dont get really why. What is there difference between what is returned by:
1. jQuery(this).parent('p')[0] 2. this.parentNode Olivier On 5/29/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
> I'm trying to get this working: > jQuery('#accordion [EMAIL PROTECTED]').click(function(){ > var rank = jQuery('#accordion > p').index(function(){jQuery(this).parent('p').eq(0)}); > }); I'm not sure why you would want to do this, but the following should get the effect your desire. jQuery('#accordion [EMAIL PROTECTED]').click(function(){ var parent = this.parentNode; var rank = jQuery('#accordion p').index(parent); }); ~Sean