On Hover Add/Remove Class - Jquery

On Hover

Snippet Code


  
Rate this page :
  [ 0 votes]

This snippet allows you to add a specific style class and remove a style class.you can create styles and embedd to this code

//Adding the JavaScript //On Hover $('.onhover').hover( function(){ $(this).addClass('hover_style_class') }, function(){ $(this).removeClass('hover_style_class') } ) //adding html <div class="onhover"> Now I Hover! </div>

Tags


Ask Questions

Ask Question