mmenu - how to switch off auto open on page load - javascript

Every time I load a page using mmenu the menu automaticaly appears after a second. How do I switch this off? I want the menu to appear ONLY after clicking on the menu button.
This is a link to the plugin: http://mmenu.frebsite.nl/
Thanks & regards

If the URL contains a hash that points to the menu, the menu will open. This is so the menu will open even if the user clicks the button before the menu was created. If you remove the hash from the URL, the menu will not open on pageload.

Related

Admin LTE Submenus not remaining open on click

I have incorporated AdminLTE template for my Visual Basic Project. I want the same effect which has been used for the demo:
https://almsaeedstudio.com/themes/AdminLTE/index.html , i.e when you click on sub menu in the Tree view drop down the targeted page open but the Tree view stays open and shows which page is active. Which is not happening in my case, when I click on the sub menu, it takes me to the targeted page, but the Tree view closes automatically.
Please help.
On the menus, the active class set according to the route and you need to put active conditions manually according to each route.

Make menu go away when an item is clicked on mobile/tablet

I have a pretty specific problem which i am hoping someone can guide me in the right direction with.
Here is the website link : http://rimowaedition.com/
When on a tablet or mobile device the menu is condensed into a button. To chose anything on the menu
1. i have to click the button and it brings a drop down list.
2. Click on the page i want to go to.
3. click the menu button to close the drop down list or else it takes up the whole screen and i cannot see the page in the back.
Here is a screenshot of how it is: http://imgur.com/aV7RHwb
Is there any way to make it so that when i click an item in the drop down it automatically closes the menu and goes to that page.
Any guidlines or clues as to how i would go about doing this would be much appreciated since as of now i am pulling my hair out .
You can set a click event on any item in the menu lists that you click.
So...
If you're using jQuery
$('list-item').click(function() {
//Remove the class that causes the menu to be open
//Perform any actions that you need after the button is clicked
//such as loading another page
});
This can also be done in vanilla javascript. Just search up click events in javascript.
Use JavaScript Use JavaScript on the click event of any of the
> <a href>'s
in the menu to hide the menu.
on the click event of any of the
> <a href>'s
in the menu to hide the meUse JavaScript on the click event of any of the
> <a href>'s
in the menu to hide the menu.
nu.

Foundation 5 The expanded topbar menu remains visible when clicking the browser "back" button

I just looked at the Foundation site, and this appears to be the default behavior. It seems strange. Clicking the browser back button should load the previous page but, it opens menu dropdown.
How can I hide that menu drop down? And it should show the previous page.
Thanks

Tabbed menu in CSS and Javascript - tab sets to active after refreshing page

I have tabbed menu written mainly in HTML and CSS. There are 5 tabs, the first one is set to active when we first load the page. I had to add little JS script, because that active tab wouldn't change its look to "not-active" when we clicked on another tab (so we had two tabs with "active" look). Everything works fine, but if we click on, let's say, 3rd tab and then refresh website, the first tab changes its look from "not-active" to "active", so there are two tabs with "active" look. Only the styling is wrong, content in the tabs views the right content... So if we click on another tab and refresh the page, we have two tabs with "active" look, but the website still views the content from the right tab. I don't want the first tab to set its look to "active" after refreshing page. I don't know JS and I don't know how to fix it.
Javascript:
jQuery(function($){
$(".tabmenu").children("div").click(function(){
$(".current").removeClass("current");
});
});
Here's the full code: http://jsfiddle.net/y5SzQ/1/
The simplest solution
$(".tabmenu").children("div").click(function () {
$(".current").removeClass("current");
})
.filter(location.hash).click();
(to test: change tab, right click Reload resule frame)
Demo: http://jsfiddle.net/y5SzQ/3/
What it does is just triggers click event similarly to what happens when user clicks with a mouse. If there is location.hash (say '#french-tab') and tab other then Polish has to be selected, then .filter(location.hash) will become for example .filter('#french-tab') and corresponding tab will be selected.

jQuery: onclick drop-down menu with controls

I wish to create a menu (a sign-up menu), see this to get an idea of it. When user clicks on this button/link a drop-down menu appears, using which he can do something (here login).
The behaviour of the link should be the following:
The drop-down menu should appear when clicked on this button/link.
when clicked anywhere on the page (including the button/link itself), but outside the menu, the menu should disappear.
If clicked somewhere on the drop-down menu, the menu should not disappear.
All the controls in the drop-down menu should work.
I did somehow managed to get first three working, but then the controls within the drop-down menu (4th behaviour) are not working.
The javascript/jQuery code along with html code is given here (jsfiddle link, same as above). You can fork it and make changes.
Thanks.
check this
http://thefinishedbox.com/files/freebies/loginfreebie/index.html
Download tha code
http://thefinishedbox.com/freebies/scripts/jquery-dropdown-login/
I made a fork of what you have on your jsFiddle: http://jsfiddle.net/DukyJ/
If you look at the code I just added an extra div to have the page's content so I don't have to assign click events to the whole body just only to that div.
Then, I removed the return false and the stopProppagation and just added a '#' to the link in the href because it wasn't necesary.
And finally just added some style to the signin link and the singin panel so you can see that the menu appears over the content as I suppose you want it to appear.

Categories