How can you hide or change the parent div having some specific content?

<script>
$(document).ready(function () {
    $("a:contains('ordinary text')").parent('.classname').hide();
});
</script>

or

<script>
$(document).ready(function() {
  if( $('label:contains("Size")').length) {
    $('span.amount').hide();  
    $('.price').hide();
  }
});
</script>

No comments:

Post a Comment