Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 289
Registered: ‎10-17-2008
My Device: Torch 9800
My Carrier: Rogers

code optimization

Would anybody have any suggestions on speeding up this bit of code?

 

It just changes the "selected" highlight around some ul elements. However, I find it quite laggy on my 9810.

 

function mouseOverEvent(eventMouseOver)
{
    iChecklistFocused = (eventMouseOver.currentTarget.getAttribute("id",0)).substr(11).valueOf();
    if (sSelectedElement.length > 0)
    {
        $("#" + sSelectedElement).css("border-width", "1px");
    }; // end if
    $("#" + eventMouseOver.currentTarget.getAttribute("id",0)).css("border-width", "3px");
    sSelectedElement = eventMouseOver.currentTarget.getAttribute("id",0);
};

 Thanks

 

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.