Basic jquery

Estimated reading time: 1 minute

ready

jquery library loading after ready . jquery has 4 types ready function .

  • 1
$(document).ready(function() {
   // jQuery code goes here
});
  • 2
$(function(){
  // jQuery code goes here
})(jQuery);

  • 3
$(function(){
  // jQuery code goes here
});
  • 4
$(window).load(function(){
  // jQuery code goes here
});

jquery main theme

  • selector
  • action

selector

selector start with $ . $(selector)

~selector

  • html element
  • class
  • id

selector

img credit : sololearn

react, mobx