I added the following into a page of one of my post view in rails.
However when I click on it it doesn’t bring up the “Hello UJS!” what am
I missing here?
<script
src=“http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”
type=“text/javascript” charset=“utf-8”>
$(function() {
$(“#alert”).click(function() {
alert(this.getAttribute(“data-message”));
return false;
})
})
</script>
<h1><a href="#" id="alert" data-message="Hello UJS!">Click
Here