Change this:
<script>
$("#change").on("mouseover", function () {
$('#change').text("This is the new html");
});
</script>
Because you are not referencing anything. Try this:
<script>
$(document).ready(function () {
$("#change").mouseover(function () {
$('#change').text("This is the new html");
});
});
</script>
Well, there was another error in the fiddle. You had not selected any jQuery version in the upper left corner. After updating, the code worked perfectly, and from this I concluded that you might have not linked the script in your website.
Try linking the script
file in the head
section of your layout (website)
Here have a look now: http://jsfiddle.net/afzaal_ahmad_zeeshan/HMhVn/3/
I have updated it, and it runs perfectly now :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…