Create link with jQuery
I would like to use JQuery to create a link button, but the code I wrote below doesn't seem to work. What is missing?
<head>
<title>Click Url</title>
<script src="http://code.jquery.com/jquery-latest.js"
type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#Button1").click(function() {
$("#an1").click();
});
});
</script>
</head>
<body>
<a href="http://google.com" id="an1">Click</a>
<input id="Button1" type="button" value="button" />
</body>
+2
Mario
source
to share