Table of contents
Introduction
Welcome to Today I Learned, your daily destination for bite-sized wisdom! Each section is a short burst of information crafted to make your day a little brighter and your mind a little sharper. Join us on this journey of Byte-Sized Learning as we explore fascinating facts, share quick insights, and uncover interesting tidbits โ because every day is an opportunity to say, 'Today I Learned.'
How to apply multiple CSS properties using jQuery?
There are times when you want to apply multiple CSS properties when there is success or failure or toggle of your DOM or AJAX. Generally, we use the following,
selector.css('display', 'block');
But what if you want to add multiple CSS properties instead of changing your .css files? The following will come to your rescue,
selector.css({'display': 'block', 'margin-top': '20px'});
Reference:
ย