/ Published in: JavaScript
I just found this interesting comment in the jQuery Syntax Hiliting Plugin "Chili".
It seems, one should preferrably use innerHTML instead the core jQuery method...
(Just to clarify: I didn't do any benchmarking myself)
It seems, one should preferrably use innerHTML instead the core jQuery method...
(Just to clarify: I didn't do any benchmarking myself)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
el.innerHTML = dish; //much faster than $el.html( dish ); //tried also the function replaceHtml from http://blog.stevenlevithan.com/archives/faster-than-innerhtml //but it was not faster nor without sideffects (it was not possible to count spans into el)
URL: http://plugins.jquery.com/project/chili