I'm looking to hide a button containing the text 'Buy Now' using jQuery. This button is within a containing div.
Basically something like this:
$("button contains('Buy Now').parent('div').hide();
You mean this:
API: http://api.jquery.com/contains-selector/
Hope it fits the cause, :) OR http://jsfiddle.net/DDv8a/ try this demo
code
$("button:contains('Buy Now')").parent('div').hide();
or
$(document).ready(function () {
$("input[value='Buy Now']").closest('div').hide();
});
:) this favour will be remembered bruv :) and shall be returned with awesomeness!:) howsz things:):) it will go into my wall, 'n you will be shout-ed with a cup of kopi luak :) if we ever met!