I am using the following jQuery
var etag = \'kate\' if (etag.length > 0) { $(\'div\').each(function () { $(this).find(\'ul:not(:contains(\' +
Another approach:
var etag='Some text from server'; if (etag.length > 0) { $('div ul').each(function () { var el = $(this); // Local reference (el.html() === etag) ? el.show() : el.hide(); }); }