Friday, 15 June 2012

javascript - Can't get slide out menu to display properly -



javascript - Can't get slide out menu to display properly -

here link site in progress -- http://barret.co/resources/testsite12345/

there nil on site yet working on skeleton, inspecting element should easy pinpoint what's wrong.

i'm working on slide out menu scratch new jquery. basically, have working, not how i'd be. can see, when click menu button in top left, slides panel left , right. i'd panel hidden upon viewing page, , slide out when menu clicked.

also, there easy way close panel if user clicks onto main page? way closes if menu button clicked again.

any help much appreciated.

thanks in advance!

i think had mixup classes.

add #left-menu css:

right: 300px;

and utilize this:

jquery(document).ready(function($) { $('#menu-container #right-menu').click(function(){ var hidden = $('#left-menu'); if (! hidden.hasclass('visible')){ hidden.animate({"right":"0px"}, "slow").addclass('visible'); } else { hidden.animate({"right":"300px"}, "slow").removeclass('visible'); } }); }); // end

javascript jquery html css

No comments:

Post a Comment