pass a variable (which is a number) to the :gt(index) pseudo-selector ?
Hello,
I am trying to pass a variable (which is a number) to the :gt(index) pseudo-selector.
- var thisParentIndex = $(this).parent().index(); //get the index of parent
- console.log(thisParentIndex);
- $(this).parent().parent().find('div.line:gt(' + thisParentIndex + ')').hide();
this does not appear to work...
Any ideas as to what I am doing wrong? I am pulling my hair out :P
cheers,
Greg