Welcome to WebmasterWorld Guest from 54.163.65.30

Forum Moderators: open

Message Too Old, No Replies

Find something by Attribute with JQuery

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

Junior Member

5+ Year Member

joined:Aug 17, 2010
posts: 188
votes: 2


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 July 20, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
posts:1585
votes: 0


Try

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

Senior Member

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

joined:Nov 28, 2004
posts:7999
votes: 0


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members