Hi There,
If I am not mistaken, 'contains' is a selector not a method.
http://docs.jquery.com/Selectors/containsYou could try with the following:
$("span.total:contains('1)").parent().hide();
OR, if you decide to place it in If-else block, then do the following:
if ($("span.total:contains('1')").length > 0 ) {
$('div.header').hide();
}
// $("span.total:contains('1')") matches all elements containing '1',
so would you have to use length to check the number of matched element
is more than 0
Hope it helps,
Thanks,
Abdullah.