Close menu on selection
using Firebug you can see that the element that is clicked receive a css class "clickedck"
you can then use this class to target the element where to fire the click event to close the menu
you can then use this class to target the element where to fire the click event to close the menu
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
- johnoatwork
- Offline Topic Author
- New Member
- Posts: 19
- Thanks: 0
Thanks so much for your help! The class is of course added dynamically and I didn't notice it. This works beautifully:
The 150ms delay just smooths the transition out a bit. Great!!
Code:
jQuery(document).ready(function(){
jQuery(document).on("click", "a", function() {
var linkClass = jQuery(this).attr("class");
if (linkClass = "maximenuck") {
setTimeout(function() {
jQuery(".clickedck .titreck").trigger("click");
}, 150);
}
});
});
The 150ms delay just smooths the transition out a bit. Great!!
by johnoatwork
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Time to create page: 0.657 seconds