Possible Duplicate:
JQuery, is there a way to select all elements on the page with a specific attribute?
My code
<html>
<body>
<script>
$(function(){
$("No idea what to write here").remove();
});
</script>
<button data-fun="a">Remove</button>
<div data-fun="b">Remoave</div>
<span data-fun="c">Remdove</span>
<strong data-fun="d">Rdemove</strong>
<b data-fun="e">Remosve</b>
<p data-fun="f">Remoe</p>
<div>Not Remove</div>
</body>
</html>
I want to remove all the elements that have the data-fun attribute no matter what the element is and value of data-fun is.
demo http://jsfiddle.net/JfBvG/
code