Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Help with navbar show/hide + animations

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #267412
    Funkaholik
    Participant

    Can’t make it work correctly click here
    its a bit messy i think even in terms of layout

    What i’m trying to achieve is hide all icons behind navicon and on click
    move them aside so they’ll be visible and took certain position around navicon +
    second click or free space will do oposite

    have come up with jquery method but its kinda wacky it’s just scales back and forth

    what would be great is if i could add a certain css rules to those icons on click (change their opacity, font-size and margin or top-right-bottom-left positioning)

    #267465
    Shikkediel
    Participant

    Something like this?

    codepen.io/yvxzmb

    #267469
    Funkaholik
    Participant

    Exactly .. also can white space be involved?)

    #267482
    Shikkediel
    Participant

    Not sure what you mean by that, could you elaborate?

    #267483
    Funkaholik
    Participant

    well i mean .. hide 3 icons when click free space

    #267484
    Shikkediel
    Participant

    Ah, okay. Little trick with event propagation:

    $(function() {
    
      var guide = $('.navbar-item');
    
      $(window).on('mouseup touchend', function() {
    
        if (guide.hasClass('active')) guide.removeClass('active');
      });
    
      $('.navbar-wrap').on('mouseup touchend', function(e) {
    
        e.stopPropagation();
      });
    
      $('.menu-icon').click(function() {
    
        guide.toggleClass('active');
      });
    });
    

    codepen.io/aqROOm

    #267501
    Funkaholik
    Participant

    Superb .. thanx, Edo

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design’ is closed to new topics and replies.