How do I make the content Scroll to right or left, when clicked on the menu item?

Hi everyone,

This question is related to Scroll page parallax when I click on navigation menu (Parallax Scrolling) - #28 by ronpat question

I am redesigning my project with bootstrap now.

this time I am placing the nav bar on the left and I want when I click on the menu item it should slide to left.

Below is what I have done till date.

https://www.dropbox.com/s/kzl5plkk5ndia0o/snapchat_parallax1.zip?dl=02

Please help how to move forward.

thanks again.

Are you asking for help with the JavaScript? If so, I’ll move it to that forum.

Oh yes. Apologies for that

No problem - I’ve moved it now.

2 Likes

Since you’ve included jQuery, this is very straightforward:

$('#menu a').click(function() {
    $('#sidebar-wrapper').css({left: 0});
});

BTW, you don’t need to include bootstrap.css and bootstrap.min.css. ;-) The latter is just the minified version of the former.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.