SoFunction
Updated on 2025-04-10

jQuery animation ajax event (example explanation)

Without further ado, just upload the code

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>Document</title>
</head>
<body>
 <script>
  //ajax
  $.ajax({
   url:'json/?_='+(),
   type:"get",
   dataType:'json',//"text"、"html"、"jsonp"
   success:function(data){

   }
  })
  //event  var $box = $("#box")
  $('click',function(){
   (1)//this: current element (JS native object) $(this)  })
  $('click',function(){
   (2)
  })
  $('mouseout',function(){
   (3)
  })
  //tool  //each: There are two each in jQuery (there are also two maps, which are the same as each principle, but can support the return value)  //Each item in the jQuery collection obtained by the loop selector  $('div').each(function(index,value){

  })
  //Loop every item in an array, class array, object  $.each([12,23,34],function(index,value){

  })
  //$.makeArray ===>equivalent to listToArray
  //Animation  //$('#box').animate({left:xxx,top:xxx,...},duration,"linear/swing",function(){})
  //stop: End the animation that was running before, and start the next new animation (end the previous animation, and the next animation starts moving immediately after the current position)  //delay: Delay  //finish: End the previous animation and let the element quickly reach the target position, and start the next animation  /*
    fadeIn (fade in) fadeOut (fade out) fadeToggle
    show hide toggle
    slideUp slideDown slideToggle

   */
 </script>
</body>
</html>

The above article of jQuery's animation ajax event (example explanation) is all the content I share with you. I hope you can give you a reference and I hope you can support me more.