Ok that was a vague subject line. I'll explain:
I have a <button> html tag. I would like to be able to register an event to that button based on the content within the tags. like this:
I don't know if that even works. I can't find a suitable answer from jquery.com's api reference or examples yet.
If not I'll just use the ID reference. I just want to know if I can even assign it like that.
Thanks.
I have a <button> html tag. I would like to be able to register an event to that button based on the content within the tags. like this:
Code:
<button>Add</button>
Code:
$(document).ready(function(){
$("button('Add')").click(function(event){
// do stuff
});
});
If not I'll just use the ID reference. I just want to know if I can even assign it like that.
Thanks.
Comment