jQuery

ajax javascript

How to Create Callback Function in jQuery

In this article, you will learn How to Create Callback Function in jQuery.

Example:-

<html>
<head>
<title>Callback Function in jQuery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("p").hide("slow", function(){
      alert("The paragraph is now hidden");
    });
  });
});
</script>
</head>
<body>
<button>Click 
jquery ajax

How to Create Get Content and Attributes in jQuery

In this article, you will learn How to Create Get Content and Attributes in jQuery.

Get Content

  • text()
  • html()
  • val()

Example:-

<html>
<head>
<title>Get Content</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#btn1").click(function(){
    alert("Text: " + $("#test").text());
  });
  $("#btn2").click(function(){
    alert("HTML: " + 
append

How to Add New HTML Content using jQuery

In this article, you will learn How to Add New HTML Content using jQuery. Four jQuery Methods for add new content.

  • append()
  • prepend()
  • after()
  • before()

jQuery append() method

<html>
<head>
<title>jQuery append() Method</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#btn1").click(function(){
    $("p").append(" 
Development jquery

How to Create Remove Element or Content using jQuery

In this article, You will Learn How to Create Remove Element or Content using jQuery

jQuery remove() Method

Example:-

<html>
<head>
<title>jQuery remove()</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#div1").remove();
  });
});
</script>
</head>
<body>
<div id="div1" style="height:100px;width:300px;border:1px solid black;background-color:red;color:#ffffff">
<p>Welcome 
datatables

How to Create Filters using jQuery

In this article, you will learn How to Create Filters using jQuery.

Example:-

Method of Filter Tables

<html>
<head>
<title>Filter Table<title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#myInput").on("keyup", function() {
    var value = $(this).val().toLowerCase();
    $("#myTable tr").filter(function() {
      $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
    });