Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var slidebar_width = jQuery(window).width(); //slidebar width + padding size
- var slide_bar = jQuery(".side-menu-wrapper"); //slidebar
- var slide_open_btn = jQuery(".slide-menu-open"); //slidebar close btn
- var slide_close_btn = jQuery(".menu-close"); //slidebar close btn
- var overlay = jQuery(".side-menu-overlay"); //slidebar close btn
- slide_open_btn.click(function(e){
- e.preventDefault();
- slide_bar.css( {"left": "0px"}); //change to "right" for right positioned menu
- overlay.css({"opacity":"1", "width":"100%"});
- });
- slide_close_btn.click(function(e){
- e.preventDefault();
- slide_bar.css({"left": "-"+ slidebar_width + "px"}); //change to "right" for right positioned menu
- overlay.css({"opacity":"0", "width":"0"});
- });
- jQuery('.button__subcategories').on('click', function() {
- if(!jQuery(this).parent().hasClass('on__submenu')) {
- jQuery(this).parent().addClass('on__submenu');
- } else {
- jQuery(this).parent().removeClass('on__submenu');
- }
- });
Add Comment
Please, Sign In to add comment