Welcome to WebmasterWorld Guest from 50.16.112.199

Forum Moderators: open

Find something by Attribute with JQuery

   
9:06 pm on Jul 20, 2011 (gmt 0)



I have a button that does not have a unique class or id but it does have value="Download". I can't edit this button.

How would I use JQuery to find this button then edit the css?

Any help would be greatly appreciated!
11:08 pm on Jul 20, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Try

$('[value="Download"]')
5:01 pm on Jul 21, 2011 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Or . . . if that value may change, descendant selection. If there are any parent elements with ID's or other handles,

<form id="some-form">
<input type="submit" value="Download Now">
</form>

$('#some-form :submit')

Use :button if it's a button. Which it shouldn't be, I'd think.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month