So This is the html I wrote:
<html>
<head>
<script type="text/javascript" src="language.js"></script>
</head>
<body>
<div class="eng"> Change this English sentence </div>
<span id="frn" style="text-decoration:underline">French</span>
</body>
Meanwhile, the jQuery:
$(document).ready(function(){
$("#frn").on('click', function(){
$(".eng").html("modifier cette phrase en anglais");
});
});
I use Microsoft Expression Web 4.0.1460.0 to generate this codes. So, what I want to do is change the text on a div when user click on span. In this case, change a defined text from english to french when someone click on span with text French and ID #frn.
However, when I preview this on Google Chrome. It didn't work. By clicking the span, nothing happened. Please kindly help me on this.