I have this HTML
<div class="someclass">
<input id="special" type="submit" value="Post"/>
</div>
And I’m confused as to how I can run jQuery to click and run a function ? i.e. this works
<div class="someclass">
<input id="special" type="submit" value="Post" onclick="specialFunction();"/>
</div>
But this doesn’t ?
jQuery('#special').click(function () {
specialFunction();
});
Any ideas ?
try this:
but I recommend that you use the live instruction in order to apply to any links that may appear later, doing so: