Ask questions and get good answers on jQuery

Im trying to use your mbMenu component but I am having a few issues with it.

Firstly the way you have implemented it means that you duplicate all content defined in the menu divs. Then when you hover over the table holding the main menu divs you then duplicate all of the elements, and their ids. This is totally wrong. There should only ever be one instance of an id on a page.

I found that I am unable to, for example, use the jQuery date picker element inside the drop down menu due to the fact that you duplicate all your ids, and then destroy all the content after the menu is hidden. Why not just restyle all of the existing content, or remove it and replace it with the new content and just hide it while its not in use???

Ive also found that you do not allow script tags inside the menu divs. Because you create and destroy your content each time a menu is hovered over, you cannot apply any event handlers to (in this case) any form elements you may have inside your menu at run time.

If you could shed some light on this for me Id appreciate it.

Cheers, Tom

asked Apr 23 '10 at 13:38

Tom%20Shaw's gravatar image

Tom Shaw
111

edited Apr 23 '10 at 21:56

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129


Hi Tom, this component is thought to be a menu and it should not contains other tools inside; it's true, it clone and destroy each time all the elements shown and you can not initialize components inside it. But as a menu it should contain just lines with some action behavior or simple form elements or text; for the IDs it set a new ID to each menu container once opened and you can try to work with it adding some "live" listeners.

I'm now working on a new release where menus are not cloned but moved once called and adding callbacks for onMenuOpen, onMenuClose events. Hope soon on mb.ideas aka pupunzi.com

answered Apr 23 '10 at 21:56

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×1

Asked: Apr 23 '10 at 13:38

Seen: 446 times

Last updated: Aug 14 '10 at 00:23

Related questions

jQuery main site - Matteo Bicocchi