Skip to content Skip to sidebar Skip to footer

Complex Jquery Filter() Not Working

I am trying to dynamically insert links to return to the top of the document at the end of every section of a web page (sad to say, but it's table-based layout). I'm using the jQu

Solution 1:

That's because you are comparing 2 different objects that is always false, you should use is method or length property:

var lastRow = $('tr').filter(function(){
    return$(this).next(".head").length;         
    //return$(this).next().is(".head"); 
});

However, I'd suggest using .prev() method:

$('tr.head').prev(); // selects the previous sibling tr element

Post a Comment for "Complex Jquery Filter() Not Working"