Saturday, February 12, 2011

How do I make a popup menu open in a diagonally using jQuery?

I need to make a mouseover menu that opens diagonally (from top-left to bottom-right).

  • Use a Tween to tween the height from 0 to whatever height you want, and width from 0 to whatever width you want.

    You can take examples of making a popup menu show from the code here, as well as examples of performing actions on hover.

  • Assuming your menu has id "mymenu", try this code to show it:

    $('#mymenu').animate({width: '80px', height: '200px'})
    

    and this code to hide it:

    $('#mymenu').animate({width: '0px', height: '0px', opacity: 'hide'})
    
    From Pier Luigi

0 comments:

Post a Comment