Hello,
Why it is not working?
Why it is not working?
Code:
<script>
$( "p" ).click(function() {
var htmlString = $( this ).html();
$( this ).text( htmlString );
});
$("p").click(function(){
alert("The paragraph was clicked.");
});
</script>
Code:
<p> <b>Click</b> to change the <span id="tag">html</span> </p> <p> to a <span id="text">text</span> node. </p> <p> This <button name="nada">button</button> does nothing. </p>
Comment