I have some trouble with filtering in jQuery:
<div>content: content: {"bla":"test","IMPORTANT"}</div>
<button>Remove</button>
<script>
$("button").click(function () {
$("div").remove(":contains('content: content: {\"bla\":\"test\",\"')");
});
</script>
So, onClick the whole div is being removed, I only want to remove the specified part, how can that be done?
Thanks!
If the content of the div always comes in the same fashion, the following code will make a solution
Check the demo in Fiddle
EDITED FIDDLE: http://jsfiddle.net/2Gcy9/1/