Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1296613
    ermitag
    Participant

    Hi.
    1)How can i get close button on widgetbar
    like on screenshot?
    http://prntscr.com/dkku76

    2)It is possible to get widgetbar closed, when clicking outside widgetbar area?

    Thank you

    #1296789
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    Please add this code to Admin > Appearance > Customizer > Custom > Javsacript

    jQuery( function($) {
    
    $('.x-widgetbar-inner').append('<a href="#" class="top-widget-close"></a>');
    $('.top-widget-close').on('click', function(e){ e.preventDefault(); $('.x-btn-widgetbar').trigger('click') } );
    
    } );

    Then this CSS to Admin > Appearance > Customizer > Custom > CSS

      .top-widget-close {
    position: relative;
    }
      .top-widget-close {
      position: absolute;
      font-family: FontAwesome;
      right:10px;
      bottom:10px;
      }

    Hope this helps.

    #1297879
    ermitag
    Participant

    Thank you.

    for second question
    2)It is possible to get widgetbar closed, when clicking outside widgetbar area?

    I find this solution:

    jQuery(function($){
    $(“.x-slider-container, .masthead, .x-main”).on( “click”, function(){
    $(“.x-widgetbar.in”).removeClass(“in”);
    });
    });

    Right?

    #1297882
    Christopher
    Moderator

    Hi there,

    Please update it to :

    jQuery(function($){
    $(".x-slider-container, .masthead, .x-main").on( "click", function(){
    $(".x-widgetbar.in").removeClass("in");
    $(".x-widgetbar").css("height";"0");
    });
    });

    Hope it helps.

    #1297890
    ermitag
    Participant

    when both scripts:

    jQuery( function($) {
    $(‘.x-widgetbar-inner’).append(‘‘);
    $(‘.top-widget-close’).on(‘click’, function(e){ e.preventDefault(); $(‘.x-btn-widgetbar’).trigger(‘click’) } );
    } );

    jQuery(function($){
    $(“.x-slider-container, .masthead, .x-main”).on( “click”, function(){
    $(“.x-widgetbar.in”).removeClass(“in”);
    $(“.x-widgetbar”).css(“height”;”0″);
    });
    });

    disapear “close” button

    #1297938
    Lely
    Moderator

    Hi There,

    Would you mind adding both scripts so we can see the error? Thank you.

    #1297967
    ermitag
    Participant
    This reply has been marked as private.
    #1297998
    Lely
    Moderator

    Hi There,

    I can’t seem to duplicate the issue. See attached screenshot. Can you try to cleat cache? The code is not there when I tried to view the source code of the page.

  • <script> jQuery(function($){ $("#no-reply-1296613 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>