Select element based on EXACT text contents

How about this:

$('.existing_ad .index').filter(function() {
    return $(this).text() == index;
}).parents('.existing_ad');

Leave a Comment