The click event is not working
Can someone point me in the right direction in figuring out why the event in the code below is not working. I tried using firefox but not sure how to troubleshooting this problem using firefox.
Whe开发者_开发问答n I click on the button, nothing happens. I don't see the alert box
<script type="text/javascript">
$(document).ready(function()
{
$(#saveButton).click(function()
{
alert("hello World");
});
});
</script>
<div id="west" class="ui-layout-west">
<input id="saveButton" type="button" value="save"></input>
<div> <ul id="ul_west"></ul> </div>
</div>
You forgot the quotes around the id.
$('#saveButton').click(function(){
alert("hello World");
});
$('#saveButton').click(function() // forgot '
{
alert("hello World");
});
精彩评论