Home > DeveloperSection > Forums > Jquery: Append a Class on hover of a div and remove when not hover
Samuel Fernandes
Samuel Fernandes

Total Post:159

Posted on    May-11-2013 3:12 AM

 JQuery JQuery 

 1 Reply(s)
 1710  View(s)
Rate this:
Hi Expert!

I want to append a class to a div on hover of that div and remove that class when its not on hover. And when I hover on another div, again this class should be 

appended and removed when its not on hover. Someone say me how to do it in jquery......

Thanks in advance!


Total Post:604

Posted on    May-11-2013 9:56 AM

Hi Samuel!

replace addClass and removeClass functions in jquery as following 

$(document).ready(function() {     
    $('#secID, #thID').hover(function(){     

I hope it is useful to you

Don't want to miss updates? Please click the below button!

Follow MindStick