I've Fixed the Off Canvas Same Page Menu Links Problem - Elementor

Поділитися
Вставка
  • Опубліковано 28 гру 2024

КОМЕНТАРІ • 92

  • @websquadron
    @websquadron  6 місяців тому +4

    The code has been reworked to also;
    - Allow Close Off Canvas when you assign to an icons/link etc to also work :)
    - Allow Links to other pages or external links to also work :)
    - Added in Transition and Motion Effects for Slide-in-left and Slide-out-left :)
    www.codesnippets.cloud/snippet/WebSquadron/Off-Canvas-Widget-Anchors
    I hope Elementor put this all into the widget natively.

  • @ElementoryMyDearWatson
    @ElementoryMyDearWatson 6 місяців тому +13

    Yet again Imran solves a problem Elementor should have already figured out. Well done mate.

  • @OlufemiSoyinka
    @OlufemiSoyinka Місяць тому +1

    You are making a lot of difference, Imran! Thank you.

  • @cacomartin
    @cacomartin 6 місяців тому +3

    Pure madness to solve problems that drive us crazy! This code snippet is really helpful. Thank you!

  • @keysncoffee7733
    @keysncoffee7733 6 місяців тому +3

    Another day, another Imran video for my SOP. Thank you, man!

  • @DeoptochtSchaijk
    @DeoptochtSchaijk 6 місяців тому +2

    Thank you so much Imran, I indeed ran into this problem and it is now solved! Keep up your great videos and help!

  • @QuaverloveStudio
    @QuaverloveStudio 6 місяців тому +1

    ... and solve problems you certainly do.
    Thanks again, Imran.

  • @skywebdesigndevelopment6818
    @skywebdesigndevelopment6818 6 місяців тому

    Pretty good! Just a few things: 1) If you have a "close" icon (eg. "X") in the Off-Canvas Widget, it doesn't work, although the Widget can be closed by clicking the overlay. 2) If you have closed the Widget on click, and then click the page toggle [icon] to re-open it, it won't work. 3) The code is a little buggy if the Entrance and Exit Animations are changed [in the code] (eg., slide in/out Right instead of Left).

    • @websquadron
      @websquadron  6 місяців тому

      Yup that's where the code will need adapting for the animations. This is a start and hopefully the code will be refined especially for the close icon.

    • @websquadron
      @websquadron  6 місяців тому +1

      I've redone the code to allow the 'Close' Icon to also work :)
      See the altered code: www.codesnippets.cloud/snippet/WebSquadron/Off-Canvas-Widget-Anchors

    • @skywebdesigndevelopment6818
      @skywebdesigndevelopment6818 6 місяців тому

      @@websquadron Very nice! By the way, if this is really Imran, you are a massively entertaining and generous guy to share your knowledge. Can't thank you enough for that. And (of course) I'm still experiencing one last issue. Regardless of the type of link (menu item, external, anchor ...) I click on inside the Off Canvas, the widget still slides out Left when code is tweaked to slide out Right. Sadly my JS is lacking so not sure what's going on there.

    • @websquadron
      @websquadron  6 місяців тому

      @skywebdesigndevelopment6818 it is me :) did you adjust the transform values?

    • @skywebdesigndevelopment6818
      @skywebdesigndevelopment6818 6 місяців тому

      @@websquadron yes, I did that as well, but will keep playing with it and check for conflicts. no worries, I only mention it in case you're experiencing it as well.

  • @pixelgap
    @pixelgap 6 місяців тому +2

    Thank you Imran. Excellent solution.

  • @arnelGo-fj7qc
    @arnelGo-fj7qc 22 дні тому

    Thanks a lot. I encountered the same issue with the Elementor menu. I tried revising the code, but it didn't work.

  • @Winstonbee3366
    @Winstonbee3366 6 місяців тому +1

    Thank you!!! I’ve run into this exact problem and couldn’t figure out how to fix it

  • @MarkGovaerts
    @MarkGovaerts 5 місяців тому +1

    Thanks for another great snippet!

  • @Critterles
    @Critterles 6 місяців тому

    Your videos are fantastic, I have learned so much from them. Question: Do you know of a way to make the Off-Canvas Container auto show on page load? The toggle button would still be great to show but I would like my Off-Canvas Container to show as default on Page load. Any help or suggestions would be appreciated.

    • @websquadron
      @websquadron  6 місяців тому

      Hmmmmm.... good question. I'll have to check.
      Would you still have a close button?
      Or could they re-open it?

  • @bigtutos5804
    @bigtutos5804 6 місяців тому

    Thank you very much, please do you have the code for the Mega Menu too?

  • @omiebi_
    @omiebi_ Місяць тому +1

    Imran to the rescue!!
    Thank you.

  • @sergio_grez
    @sergio_grez 6 місяців тому

    Hello!! Thank you for your videos! One question. Can this be used for triggering a filter menu (categories) for a store in the actual store page? Thank you!

    • @websquadron
      @websquadron  6 місяців тому +1

      Yes, I tested this in a previous video.

    • @sergio_grez
      @sergio_grez 6 місяців тому

      @@websquadron great! Thank you, I'll search for the video

    • @websquadron
      @websquadron  6 місяців тому +1

      @@sergio_grez ua-cam.com/video/_x4CqMp6zRg/v-deo.htmlfeature=shared

  • @mikeisfreeX
    @mikeisfreeX 6 місяців тому

    Good one but one more thing to setup. You should make sure Your entrance and exit animation is either empty or same as in snippet. Otherwise You will have a glitch effect like the widget is opening/closing twice.
    At least I had this issue after applying this snippet

  • @doumlegare
    @doumlegare 6 місяців тому +1

    Thanks for sharing Imran😊

  • @goncalosousa5580
    @goncalosousa5580 6 місяців тому

    This is perfect. But i have 4 off-canvas widgets on page… will this work for all? Or the closed ones will open because of the toggle?

    • @websquadron
      @websquadron  6 місяців тому

      Hmmmmmm.... have a go....

  • @nickday7555
    @nickday7555 4 місяці тому

    Imran, have you had any success using an off-canvas widget on a loop grid (for example to show extra detail on a personnel bio)? There doesn't seem to be a way to call the widget.

    • @websquadron
      @websquadron  4 місяці тому

      See the video I did yesterday on calling dynamic data in a loop grid like a pop up - you could use the same to summon a container

  • @StanlayForker
    @StanlayForker 6 місяців тому +1

    Genius 😅 Thank you. 🙏

  • @viktorvarbanov1079
    @viktorvarbanov1079 5 місяців тому

    Thank you for this solution! Have you had issues on mobile though? It seems to work fine when simulating a mobile device in my browser, but when opening the off-canvas an actual phone and clicking an anchor, the off-canvas doesn't close.
    Any ideas on what could possibly cause this and how to fix it?

    • @websquadron
      @websquadron  5 місяців тому

      Hmmmmm it should be fine for mobile too.

    • @MaedehSedighi-c2w
      @MaedehSedighi-c2w 4 місяці тому

      hi i have this problem too.... did u find any solution?

    • @Wpgodev
      @Wpgodev 3 місяці тому

      yes i also have the same problem, the code works when as admin. if not admin the code doesn't work

  • @decrea8439
    @decrea8439 6 місяців тому

    Sr. Your Solution awesome, one question , you posted a video about how yo get clients using LinkedIn but i can' t find It, did you delate It?

    • @websquadron
      @websquadron  6 місяців тому +1

      ua-cam.com/video/2gSsDLaxM1U/v-deo.htmlfeature=shared

  • @ashrafulalam1734
    @ashrafulalam1734 6 місяців тому

    You should have also pushed the content (behind the off-canvas menu) in the same direction as the menu when it extends out.

  • @limitededition0668
    @limitededition0668 4 місяці тому

    imran , hope you doing good , i have made my icon which is anmited one it is also in html and when i add the class off-canvas-toggle-button in to the html animated icon , the code is not working,

  • @godwinitopaotaru508
    @godwinitopaotaru508 3 місяці тому

    Thank you Imran!
    But this doesn't work on mobile. Please, any fix for that?

  • @MbonisiM
    @MbonisiM 6 місяців тому +1

    1:33 having watcher this part i am now thinking i can i incorporate this on my website 😅

  • @xehon_fr
    @xehon_fr 5 місяців тому

    Many thanks for this great video!
    I'm trying to add anchor navigation within the same canvas-off or within a popup, but it's not working :(
    To explain in more detail, let's start from a basic page. On this page, when clicking on a group of images, I want to display a popup (or canvas-off) that shows a more comprehensive gallery of images. At the top of this popup (or canvas-off), 4 image thumbnails would allow quick access (like a mini menu) to the relevant section via scrolling within the same popup.
    With popups, the anchor is followed correctly and scrolling occurs, but the popup closes... And with Canvas-Off, it seems that anchor navigation within this canvas-off doesn't work because no scrolling is triggered :(
    I couldn't find this in your videos, have you already covered this topic?
    Is what I'm trying to achieve even possible? :)

  • @sakelis368
    @sakelis368 6 місяців тому

    Let me start from thanking you for your efforts. Being an author, rather old in age, I tried to use the Off-canvas widget for reading the first chapter of my novels. The problem is that the max width is 500px not enough for reading a page. Any suggestions? Anyway thanks again.

    • @websquadron
      @websquadron  6 місяців тому

      You can overwrite and change it to 100%

    • @sakelis368
      @sakelis368 6 місяців тому

      @@websquadron It was that easy!!!! Thanks for your immediate reply.

  • @rosslevitt5083
    @rosslevitt5083 6 місяців тому

    Well done sir!

  • @saschakoeth8083
    @saschakoeth8083 3 місяці тому

    Great Script! Only issue I am having currently: Once I clicked a link from within the off canvas panel and returned to the page the anchor scroll and closing of the off canvas panel works great, BUT I need to click the trigger button twice to reopen the off canvas panel again. At first it is not even showing hover states. only after clicking it once it works. And somehow until I click it once I can not click on any other trigger button in my menu for other offcanvas pannels aswell. They are kind of blocked. Any idea why this happens?

    • @saschakoeth8083
      @saschakoeth8083 3 місяці тому

      I found the issue and a solution: In the styling section you need to change .e-off-canvas-overlay-hidden {display: none !important;} to .e-off-canvas-hidden {display: none !important;}

    • @saschakoeth8083
      @saschakoeth8083 3 місяці тому

      Damn... having multiple off canvas elements on the same page does not work with this script I even tried to modify the script by using the aria-label of each off-screen panel... but that did not work either.

  • @justindouglas3659
    @justindouglas3659 6 місяців тому

    Hey imran, i used the offcanvas for mobile to link on the same page but it does not go to that section that was anchored with. Have ypu alsp ran into this problem if so what did you do to solve it.

    • @websquadron
      @websquadron  6 місяців тому

      Not had that problem as this solution sorted that out for me

  • @WTPleo
    @WTPleo 6 місяців тому +1

    Brilliant!

  • @rahadianputra3745
    @rahadianputra3745 6 місяців тому

    Thank you very much Imran

  • @allanshinji
    @allanshinji 5 місяців тому

    You almost helped me hahaha but I think it's a small thing.
    My problem is that I have 2 off-canvas on the same page, one opens a menu, and inside the menu there's some links for example "ABOUT" and then when you click opens another off-canvas, but the problem is that when I click on the ABOUT off-canvas, the MENU off-canvas keeps open. There's any way to close the MENU and then opens the ABOUT?

    • @websquadron
      @websquadron  5 місяців тому

      Let me have a think about that

  • @haroonkashif10
    @haroonkashif10 2 місяці тому

    Imran, this doesnt work for me. I'm using it for a popup. The menu link opens the popup, but doesnt't close even after applying the code. Can you help?

    • @websquadron
      @websquadron  2 місяці тому

      This only works for off canvas,
      I have a separate video for pop ups

  • @mauricenld4167
    @mauricenld4167 6 місяців тому

    Good job 👏

  • @tommyhutagalung2870
    @tommyhutagalung2870 2 місяці тому

    Can anyone helps me on changing animation to fade-in and fade-out? I already change the animation. But, it looks weird on fade out

    • @websquadron
      @websquadron  2 місяці тому

      Have you added ease-in-out?

    • @tommyhutagalung2870
      @tommyhutagalung2870 2 місяці тому

      @@websquadron Sorry im not strong in coding. When i click on same page menu, i think it doesn't close properly. Here is what i change:
      /* Keyframes for slide-in and slide-out animations */
      @keyframes slideInLeft {
      from {
      opacity: 0;
      }
      to {
      opacity: 1;
      }
      }

      @keyframes slideOutLeft {
      from {
      opacity: 1;
      }
      to {
      opacity: 0;
      }
      }

      /* Custom styles to manage Off Canvas visibility */
      .e-off-canvas-hidden {
      animation: slideOutLeft 0.5s 0.5s ease-out forwards; /* Adjusted duration */
      }

      .e-off-canvas-visible {
      animation: slideInLeft 0.5s ease-in forwards;
      }

      .e-off-canvas-overlay-hidden {
      display: none !important;
      }

  • @meisterleise
    @meisterleise 6 місяців тому

    How the hack did you figure this out? 😳Thanks for sharing! 🤠

    • @websquadron
      @websquadron  6 місяців тому +2

      ChatGPTTTTTT :)

    • @meisterleise
      @meisterleise 6 місяців тому

      ​@@websquadron 😅 We should inform the Elementor team so that they can also use this secret weapon.

  • @okieinthemix
    @okieinthemix Місяць тому

    Does not work for me.

    • @websquadron
      @websquadron  Місяць тому

      Works for me

    • @okieinthemix
      @okieinthemix Місяць тому

      @@websquadron good for you. oh well. thanks.

  • @StanlayForker
    @StanlayForker 6 місяців тому

    Just a small "Bug": If the off canvas contains both internal and external links, your script don't work. Often you have Onpage Links but also external links to pages like imprint, privacy and so on. How to handle this? 😅

    • @Winstonbee3366
      @Winstonbee3366 6 місяців тому

      Yes, I’ve run into this same exact “bug”. 🙁

    • @StanlayForker
      @StanlayForker 6 місяців тому

      @@Winstonbee3366 Currently working on a solution for this

    • @StanlayForker
      @StanlayForker 6 місяців тому

      @@Winstonbee3366 fixed it ... Hope it works for you as well

    • @websquadron
      @websquadron  6 місяців тому

      What was your fix?

    • @StanlayForker
      @StanlayForker 6 місяців тому

      @@websquadron Just checked if the href got an # inside or not and than run your scroll to code

  • @hollycow8171
    @hollycow8171 6 місяців тому

    OffCanvas is bit buggy right now.

    • @websquadron
      @websquadron  6 місяців тому

      I'm sure it will improve over time. I hope. I think.

  • @andreasbufe795
    @andreasbufe795 2 місяці тому

    why writing a "book of code" for closing a popup?
    jQuery(document).ready(function($) {
    $(document).on('click', '#elementor-popup-modal-54 a', function(event) {
    elementorProFrontend.modules.popup.closePopup({}, event);
    });
    });
    change ID of off canvas.... done.

    • @websquadron
      @websquadron  2 місяці тому +1

      I’ll try it out.

    • @BrookeSellars
      @BrookeSellars 13 днів тому

      because it's not a popup & this code does not work for off-canvas - 2 different things