Hello,
I need some help! I’m getting a very bad performance in my code from FireFox with event capturing. The memory usage at page load on my computer is 22mb for FireFox but shoots right up to 30mb and soon as I start triggering some of my events on my page. IE is unaffected.
I’m creating a new contextmenu script designed to run crossbrowser in an application environment. I have one main event handler function that processes every event on the page.
The problem I am having is when I hover over a menu item, this is what causes the slow performance. FireFox takes forever to add the correct classes or remove the classes from the item. Below is the HTML code that the script generates for an individual menu:
[code]
<div id=”menu1″ class=”hide”>
<div class=”scroller”></div>
<div class=”itemCont”>
<a href=”link.htm” class=”item itemHeader”>
<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>
</a>
<a href=”link.htm” class=”item”>
<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>
</a>
<div class=”divider”></div>
<a href=”link.htm” class=”item itemActive”>
<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>
</a>
</div>
<div class=”scroller”></div>
</div>
I think the problem is that the mouseover event is fireing twice on each item if I hover over one of the DIV’s inside the link.
I’ve uploaded my work to see the code in action. The address is:
[url]www.adamsvoid.95mb.com/showcase/contextmenu4/index.htm
Thank you very much
Adam