Jquery Tutorials
- What is JQuery
- DOM Document Object Model
- JQuery Syntax
- Jquery Selector
- Get & Set Form value
- jQuery - Attributes
- Attribute Methods
- jQuery - DOM Manipulation
- JQuery Events
- JQuery Effects
- JQuery Html/Css
- jQuery Insert Content
- Auto Hide Div
- JQuery noConflict()
- JQuery Form Validation
- Form Validation
- Login Form Validation
- Jquery Fadeout message
- Modal popup
- Jquery Ajax Forms
- Dependent Dropdown
- Autocomplete Country jquery ajax
- Dynamic Content Load using jQuery AJAX
- Dynamic star rating jQuery AJAX
- Drag and Drop Image Upload
- show Hide Elements By click on checkbox
- How to Add class in jQuery
- calculate discount in jQuery
- Calculate GST by input value in text box
- check Password strength in jQuery
- Count Remaining Character
- onClick Checkbox check all
- password match or not
- DataTable
- 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
- Put value in the text field
- Set Data and Attributes
Customer Say
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 :-
jQuery Tutorial
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>