Mutsop
asked on
jquery get button through value
Hi,
I've been searching on how to find a button (button tags) using only it's value.
This code doesn't seem to work (getAlignment function is correct as I checked it thourgh debugger). Doesn't input recognize button tags?
I've been searching on how to find a button (button tags) using only it's value.
$('input[value="'+getAlignment(node)+'"]').addClass("active");
This code doesn't seem to work (getAlignment function is correct as I checked it thourgh debugger). Doesn't input recognize button tags?
work fine : http://jsfiddle.net/DQC5K/
Doesn't input recognize button tags?Is it an input, or is it a button? There are two ways to create a button in HTML (well, technically 3 if you count a submit button):
<input type="button"></input>
<button></button>
So which are you using? A JQuery of $('input') will not find a <button> tag.
ASKER
it's a <button> I need to have.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wasn't expecting it to be that easy -.- Thanks! :D