Ankit Sharma
Ankit Sharma

Reputation: 396

How do i achieve the hover effect on button using jquery?

i am trying to make the drill down menu with back button using jquery for that i want to achieve the hover effect on button,for that i am using following jquery code-

     <script type="text/javascript">    
         $(function(){
               $('#hierarchy').menu({
                     content: $('#hierarchy').next().html(),
                     crumbDefaultText: ' '
               });

               $('#hierarchycrumb').menu({
                      content: $('#hierarchycrumb').next().html(),
                      backLink: false
               });
        });

Upvotes: 2

Views: 376

Answers (3)

PranayStar
PranayStar

Reputation: 68

try this code.... $('.fg-button').hover(function(){ $(this).removeClass('ui-state-default').addClass('ui- state-focus'); }, );

Upvotes: 2

mtmacdonald
mtmacdonald

Reputation: 15070

Consider using CSS to define your button style for the hover state.

button:hover{
 color: #aaa;
 /*insert desired styles*/
}

Upvotes: 0

CE_REAL
CE_REAL

Reputation: 384

If you are trying to achieve hover functionality with jQuery you can use something like:

$('#hierarchy').hover(function(){
 // Do something here
});

Or maybe you could explain more precisely what you are trying to do, can't make up much context with the code example.

Upvotes: 1

Related Questions