Knowledge Base support case for AllWebMenus,  abstracted and stripped of all user’s private info.


Initial Email From:
Claudio
Initial Email Subject: JavaScript function to trigger menu refresh.
Support Case Month: April 2013

Is there a JavaScript function I can trigger to force the refresh of the menu without having to refresh the page?

I am developing my first responsive menu, and the only solution that I could find to "wrap" the entire menu into a single button for the smartphone was to use jQuery to create another node in the <ul><li> structure for the menu.

It works! But the page needs to be refreshed.

I am open to other ideas and suggestions.  Do you have examples of other web sites that use your responsive menus that I can take a look at?  I have been using your product for many years and I don't mind adapting my design to fit your product specifications.

One more question related to Responsive Menus.

Please check in the iPad the link below.

  1. On portrait mode, select the menu option "Products", it should open the sub-menu.
  2. Leave the submenu open, and change the orientation to landscape mode.  The sub-menu remains open, but moves to Technical.

I would prefer that each time we change the orientation of the screen, the sub-menus would automatically close.

If you provide me the Javascript function that takes care of that, I can put in my code, but in this case I actually think should be default in the compilation of the AllWebMenu.

Claudio

Reply From: Likno Customer Support

Hello,

I am afraid that there is no way to refresh the menu without refreshing the page.

The only solution I can think of, is if you put the structure within the application, in which case you are allowed to have a different structure for each responsive version.

This would work, but it does not support pure CSS menus which are based on the UL/LI method (nor menus with dynamic structure, as it has to be defined within the application).

Regarding the iPad submenu issue, I have forwarded it to our developer team and I expect a fix to be released soon (so that the submenus close).

Also please note that the feature you asked for in December (loading the UL/LI menu after the DOM loads) has been included in the latest version of AllWebMenus.

Best Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

Reply From: Claudio

Thank you very much for your responses.  I understand the delay because I also deal with technical issues that sometimes they either pile up or take longer to resolve.

I am happy that the issue of December was resolved!  I will download the latest version and recompile some of my menus to test it.  Thanks for taking care of that.

Regarding the refresh of the menu, the problem I presented is not a deal breaker.  Unless you are in a demonstration showing how the web site is responsive, resizing the window, you will not encounter problems if you simply land in the responsive web site in a smart-phone, a tablet or a desktop.

However I would like to know what would be a good natural suggestion for dynamically UL/LI responsive menu.

In you example page:  http://www.likno.com/examples/responsive-menu-resize-page.html, if you think about it, it is not a practical solution.

The menu shrinks from one line (above 768px)  to two lines (between 480px to 767px), and finally to a vertical menu (below 500px).

The menu version for smart phones (below 500px) seems to have the menu aligned to the top-left corner to the window browser (I don't know how it was configured), and the content of the page inside div class=highlightBox is being squeezed to the side.  It's not a practical solution! 

By the way, the sample for the page http://www.likno.com/examples/responsive-menu-resize-page.html  should be in pure HTML5, using NAV for the menu....  just a suggestion.  Other web developers might want to see your code to copy your solution.

If you don't mind, I would like to discuss with you some suggestions to present to other programmers. I am not the type to spend time in forums and blogs, but I do like a technical challenge to be discussed directly with the solution provider.  I will be happy if I can help you improve your product, which I like and have been using for a long time.

  1. My solution in Paneltronics web site uses jQuery to dynamically create another UL/LI level to nest the entire main navigation inside a single list item.  The problem (not deal breaker) is the page refresh.
  2. Another option, that I have not thought thoroughly, is to put the AllWebMenus to work with two HTML containers:  Div1 (contains Menu button), NAV. 
    For desktop and tablet:  Div1 is set to display = none, NAV is set to display = block;
    For smartphones:  Div1 is set to display = block, NAV is set to display = none.  A simpler jQuery will toggle the display of the AllWebMenu...  
    ... is that an idea that works?  I will try it later (don't know when), and let you know.

Claudio

P.S.

http://2012paneltronics.atimo.us/AboutUs.asp?op=Snapshot

Please check the page above to see how I decided to implement the responsive menu for mobile.

I created the <div class="buttonR" id="menuButton">MENU</div> and I am using jQuery to toggle between displaying/hiding the menu.

Read my comments in green in the message below.

It's a simple solution and may work well.

Reply From: Likno Customer Support

Dear Claudio,

Nice one! Very clever workaround indeed.

So you are basically moving the Positioning Element of the smaller menu in and out of page and the menu follows that.

I will keep it in mind in case someone else has a similar issue. Also I have added the request to allow for a different UL/LI structure in each “version”. This is of considered a very low-priority for now, but it will be implemented eventually (especially if more people ask for it).

Best Regards,
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

Reply From: Claudio

Thank you!

Don't worry about the low-priority issue.  I have my problem resolved.  Feel free to share this solution with whoever has the same situation.

Claudio

 

Tags: , , , , , , , , , , ,