Remove all CSS classes using jQuery?

jquery

Instead of individually calling $("#item").removeClass() for every single class an element might have, there is a single function which can be called which removes all CSS classes from the given element?

$("#item").removeClass();

Calling removeClass with no parameters will remove all of the item’s classes.


Leave a Reply

Your email address will not be published. Required fields are marked *


Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204

Warning: count(): Parameter must be an array or an object that implements Countable in /home/umar/public_html/helpacoder/wp-content/plugins/the-events-calendar/common/src/Tribe/Customizer/Section.php on line 204