What is a different between $(this) and this in jQuery



$(document).ready(function(){
    $('#Valuediv').mouseout(function(){
       alert($(this).text());
  });
});






$(document).ready(function(){
    $('#spnValue').mouseover(function(){
       alert(this.innerText);
  });
});

In first example $(this) is a jQuery object here you are using  power of jQuery
and In Second example  'this' keyword, means you are using native JavaScript code.

Most Popular

how to delete multiple selected data in php?

ReactJs Top Hooks List