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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -