On my website, I dynamically modify the javascript 'className' property of a DIV. However this is an extrememly expensive operation, as the DIV contains a lot of child nodes. Sometimes it takes up to 1.5secs.
Is there a way of speeding up this operation? Like, hiding the content, performing the operation, then showing the content again?
Update:
Some additional information.
The actual code:
$("#myDiv").tabs();
It is located witin the .ready() handler. See http://jqueryui.com/demos/tabs/
This is the expensive call. I tracked it further down to the className property, which consumes all that processing time.
The DIV contains a big sharepoint datagrid, see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spview.renderashtml.aspx The code is run on Sharepoint, tested on WinXP + IE7.
So I wonder if we can disable the layout refreshing while manipulating the DOM or something like that. Are there any tricks?