Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

2 questions regarding menu dely and tab links


Dear KeenThemes Team,

thank you very much for this perfect framework! Thanks to your diligent work I was able to create the frontend of a member portal within a few weeks.

Thanks to the good documentation and the many examples I got along very well. Except for two things:

1. delay at mouse over of menu elements (see https://preview.keenthemes.com/html/keen/docs/general/menu/api). For many elements with MouseOver events it makes sense to have a delay when they appear. Unfortunately, the $menu-dropdown-animation-speed variable seems to only change the fade effect, but not a delay. How can I achieve this?
2. external accessibility of further tab contents (e.g. index.html#more). Possibly it's me, but I haven't found a way to create working links to the other tab contents. Do you have a tip for me?

Thanks a thousand in advance and best regards
Gordon


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

If possible, please try to use the latest Metronic v8.1.7 by downloading it from Metronic Downloads.

If your version does not have the init modal function you can add the initTabs after any init methods. The timeout for appearance is not available now but we will consider adding this in a future update. For now, we will add it to our todo list.

Regards.



Hi,

thanks for the quick reply and support! I use the Metronic theme in the latest version.

Re 1. Unfortunately, there is no initModal function in my app.js file, although I never modified this file. However, I did test-copy the initTabs function in various places and then recompiled the assets in each case. But unfortunately without success. What did I do wrong?

To 2. adjusting the hoverTimeout value affects the disappearance of the context menu after moving the mouse somewhere else. However, I am interested in delaying the appearance of the menu when I move the mouse over the button or trigger point. Twitter has something like this when you hover the mouse over a username. Any idea how I can implement this?

Thanks a million!



Hi happy,

Thank you for your kind words about Keen. Really appreciate it. May I know if are you using the Keen or Metronic theme?

If you are using the latest Keen v3.x/Metronic 8.x:

1) To activate the tab using the URL hash you should add the below function in src/js/components/app.js right after initModal function and call it under the init function right after initModal call and recompile your assets with gulp or webpack. Then you will be able to activate the tabs using <core>url.com#kt_stats_widget_16_tab_2


var initTabs = function() {
const hash = decodeURIComponent(window.location.hash).replace(/\s/g, "-").substring(1);
let tabEl = document.querySelector("[data-bs-toggle][data-bs-target="#" + hash + ""]");

if (!tabEl) {
tabEl = document.querySelector("[data-bs-toggle="pill"][href="#" + hash + ""]");
}
if (!tabEl) {
tabEl = document.querySelector("[data-bs-toggle="tab"][href="#" + hash + ""]");
}

if (tabEl) {
bootstrap.Tab.getOrCreateInstance(tabEl).show();
}
}


2) You can try to change the Dropdown hover timeout in the KTMenu plugin's source js/components/menu.js</code:


// Default Options
var defaultOptions = {
dropdown: {
hoverTimeout: 200,
zindex: 107
},

accordion: {
slideSpeed: 250,
expand: false
}
};


We will consider exposing this parameter to the HTML attribute level in a future update.

Please give it a try and please let us know the result.

Regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(