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

Latest CodeIgniter interview questions and answers

Customize wordpress register form wp_register()

how to hide and show content using jquery?