Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$('a').live('click', function () { alert('click'); });
$('form').live('submit', function () { alert('submit'); });
</script>
</head>
<body>
<form><input type="submit"/></form>
<a href="#">Test</a>
</body>
</html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$('form').live('submit', function () { alert('submit'); });
</script>
</head>
<body>
<form><input type="submit"/></form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment