jquery - Add class but change specific width for a single item -


i'm adding class text field using jquery following code:

$('[name="albdesign_wc_donation_from_single_page"]').addclass( "input-text" ); 

the width of class 100% specific object i'd specify width keep remaining css. how can this?

you add class handle or set css using .width() or .css():

$('[name="albdesign_wc_donation_from_single_page"]').addclass( "input-text" ).css('width', '100px');  $('[name="albdesign_wc_donation_from_single_page"]').addclass( "input-text" ).width(100); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -