homepage Welcome to WebmasterWorld Guest from 54.204.215.209
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Find something by Attribute with JQuery
rwilson




msg:4341948
 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!

 

daveVk




msg:4341995
 11:08 pm on Jul 20, 2011 (gmt 0)

Try

$('[value="Download"]')

rocknbil




msg:4342316
 5:01 pm on Jul 21, 2011 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved