Reputation: 3073
Using a script that reference jQuery Mobile I have the following line:
<a href="#" id="buttonAnswer1" data-role="button" data-inline="true" >check</a>
How would I add a listener for when this button is clicked and lets say call the hello() function? i.e.
<a href="#" id="buttonAnswer1" data-role="button" data-inline="true">check</a>
<script>
function hello(){
console.log("hello world");
}
</script>
Upvotes: 0
Views: 153