PHP
OOPs
JavaScript
JQuery
Ajax
Codeigniter
Laravel
MySql
Node.js
Tutorials
C
C++
Json
Codeigniter 4
htaccess
wordpress
react.js
Blogs
Fundamental
Python
Search Your Query
×
--- Select Category ---
PHP
OOPs
JavaScript
JQuery
Ajax
Codeigniter
Laravel
MySql
Node.js
Tutorials
Blogs
Fundamental
Python
Most Popular Tutorials
what is jquery
Document object model (DOM)
JQuery Syntax
jQuery Selectors
Get and set value in jquery
JQuery Attribute
Attribute Methods
jQuery - DOM Manipulation
Jquery events
JQuery Effects
Jquery Html/css Effects
jQuery Insert New Content
Auto hid Div
Jquery no conflict
JQuery Form validation
Html Form Validation
Login Form Validation
JQuery Fadeout Message
Jquery Modal popup
JQuery Ajax Form
Dynamic Dependent DropDown
Autocomplete list
Dynamic content load
Dynamic Star Rating
Drag and Drop Image Upload
show Hide Elements By click on checkbox
Add or Remove class in jquery
check Password strength
Count Remaining Character
check single or All checkboxes
Password match or not
Data Table
Date Picker
Multiselect Dropdown with Checkbox
Add Dynamic Input Field (Add More Input Field)
submit button disable after one click
Show hide password in Password textbox using checkbox
set content and value in html page
put value in the text field
sweet alert
Data-id
Tutorials Menus
what is jquery
Document object model (DOM)
JQuery Syntax
jQuery Selectors
Get and set value in jquery
JQuery Attribute
Attribute Methods
jQuery - DOM Manipulation
Jquery events
JQuery Effects
Jquery Html/css Effects
jQuery Insert New Content
Auto hid Div
Jquery no conflict
JQuery Form validation
Html Form Validation
Login Form Validation
JQuery Fadeout Message
Jquery Modal popup
JQuery Ajax Form
Dynamic Dependent DropDown
Autocomplete list
Dynamic content load
Dynamic Star Rating
Drag and Drop Image Upload
show Hide Elements By click on checkbox
Add or Remove class in jquery
check Password strength
Count Remaining Character
check single or All checkboxes
Password match or not
Data Table
Date Picker
Multiselect Dropdown with Checkbox
Add Dynamic Input Field (Add More Input Field)
submit button disable after one click
Show hide password in Password textbox using checkbox
set content and value in html page
put value in the text field
sweet alert
Data-id
Share On Facebook
How to add or remove class using jquery?
How to remove class in jQuery
File name : index.php
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<meta charset="utf-8">
<title>How to add class in jQuery</title>
<style>
.container {
width: 100%;
border: 4px solid green;
padding: 20px;
background-color:orange;
}
</style>
</head>
<body>
<div>
<h3>jQuery Tutorial</h3>
</div>
<br>
<button type="button">Add Class</button>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").addClass("container");
});
});
</script>
</body>
</html>
Output :-
How to add class in jQuery
jQuery Tutorial
Add Class
How to remove class in jQuery
File name : index.php
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<meta charset="utf-8">
<title>How to remove class in jQuery</title>
<style>
.container {
width: 100%;
border: 4px solid green;
padding: 20px;
background-color:orange;
}
</style>
</head>
<body>
<div class="container">
<h3>jQuery Tutorial</h3>
</div>
<br>
<button type="button">Remove Class</button>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").removeClass("container");
});
});
</script>
</body>
</html>
Share On Facebook
Previous
Next
Trending Tutorials
PHP
100+ Tutorials
PHP OOPs
80+ Tutorial
Codeigniter
100+ Tutorial
Laravel
100+ Tutorials
NODE.JS
100+ Tutorials
Javascript
100+ Tutorials
Download Live Projects
Review & Rating
0.0
/ 5
0
Review
5
(
0
)
4
(
0
)
3
(
0
)
2
(
0
)
1
(
0
)
Write Review Here
Review
Submit Review
×
Submit
Ittutorial
Ittutorial
Most Popular Tutorials
Add Dynamic Input Field (Add More Input Field)
check single or All checkboxes
Data-id
submit button disable after one click
JQuery Attribute
Dynamic Dependent DropDown
JQuery Fadeout Message
Date Picker
jQuery Selectors
set content and value in html page
sweet alert
JQuery Effects
Password match or not
Auto hid Div
Jquery Modal popup
Show hide password in Password textbox using checkbox
show Hide Elements By click on checkbox
Attribute Methods
jQuery Insert New Content
Login Form Validation
Important Link
Core php Online Advance Tutorails and video Tutorials.
How to manage Session in php Tutorials.
More .......
upcomming codeigniter and angular js tutorials.
Click here to see More ...
Hello Friend Please Follow & Share Ittutorial.
×
Ittutorial
Please Follow and Share ittutorial.
Ittutorial