My code:
<head>
<script src="/static/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
var value = jQuery('#continue').attr('value');
alert(value);
</script>
<title>$pageTitle</title>
</head>
<body>
<div class="notifier">
<form>
<button>Cancel</button>
<button id="continue" value="next">Continue</button>
</form>
</div>
</body>
I wish I had next, but instead I get undefined message in alert. It happens even if i try to get html() from any other tags.
#continueelement doesn’t ready when you are trying to get it’s attribute: