Jquery - 页面加载时打开侧边栏

时间:2017-07-19 21:15:03

标签: javascript jquery menu sidebar social

我希望在进入页面时关闭侧边栏。我找不到我做的事情。

// butonları görünür yap
setTimeout(function(){
    oContainer.animate({ left : 0 });
}, 200);

// butonları gizle/göster
$('body').on('click', '.show-hide-contact-bar', function(e){
    e.preventDefault();
    e.stopImmediatePropagation();
    $('.show-hide-contact-bar').find('.fa').toggleClass('fa-angle-right fa-angle-left');
    oContainer.find('.cb-ancor').toggleClass('cb-hidden');
});

我正在使用jQuery Plugin For Floating Social & Contact Sidebar

1 个答案:

答案 0 :(得分:0)

只需将cb-hidden添加到demo.js中每个项目的类中:

// Initialize Share-Buttons
$.contactButtons({
  effect  : 'slide-on-scroll',
  buttons : {
    'facebook':   { class: 'facebook cb-hidden', use: true, link: 'https://www.facebook.com/pages/mycompany', extras: 'target="_blank"' },
    'linkedin':   { class: 'linkedin cb-hidden', use: true, link: 'https://www.linkedin.com/company/mycompany' },
    'google':     { class: 'gplus cb-hidden',    use: true, link: 'https://plus.google.com/myidongoogle' },
    'mybutton':   { class: 'git cb-hidden',      use: true, link: 'http://github.com', icon: 'github', title: 'My title for the button' },
    'phone':      { class: 'phone separated cb-hidden',    use: true, link: '+000' },
    'email':      { class: 'email cb-hidden',    use: true, link: 'test@web.com' }
  }
});