I'm developing a mobile site and using jQuery.
When I load a certain page and click the desired button, the code does not execute until I refresh the page. Why is this ?
Here's how I have it
script.js
$(document).ready(function()
{
$("#user-save").click(
function(e)
{
alert(/clickity-click/);
});
});
page.php
<html>
<head>
<!-- Other jQuery files here -->
<script src="script.js"></script>
</head>
<body>
<div id="user-save" data-role="button">Click me like a boss</div>
</body>
</html>