On Windows Forms, there is a BeginUpdate / EndUpdate pair on some controls. I want something similar, but for jQuery.
I have a div that contains a div. eg:
<div id='reportHolder' class='column'>
<div id='report'> </div>
</div>
Inside the inner div add a bunch (7-12) of pairs of elements a and div, for example:
<h4><a>Heading1</a></h4>
<div> ...content here....</div>
The total size of the content is probably 200 thousand. Each div simply contains a fragment of HTML. Inside it there are many elements <span>containing other html elements, and they nest, possibly at 5-8 levels. Nothing unusual, I don't think. ( UPDATE : using this answer , I found out that there were 139423 elements in the fragment.)
After adding all the content, then I create an accordion. eg:
$('#report').accordion({collapsible:true, active:false});
.
, div, looooooong, 3 4 : " script?"?
:
1:
$('#report').accordion('destroy');
$('#report').remove();
$("#reportHolder").html("<div id='report'> </div>");
2:
$('#report').accordion('destroy');
$('#report').html('');
$("#reportHolder").html("<div id='report'> </div>");
3:
$('#report').accordion('destroy');
$("#reportHolder").html("<div id='report'> </div>");
, :
4:
$('#report').accordion('destroy');
$('#report').empty();
$("#reportHolder").html("<div id='report'> </div>");
, .
('destroy'), , . html div.
jQuery 1.3.2.
- .
ps: FF3.5, IE8.
:
FF, " 4", , :
data()
trigger()
triggerHandler()
add()
each()
each()
add()
empty()
each()
each()
(?)()
ResetUi()
onclick
, add() . , . , () jQuery - . html, html-, .add(), , .
jQuery HTML dom?
Windows Forms BeginUpdate/EndUpdate . - , jQuery.
:
jquery: DOM?