I have web service that uses jQuery UI elements (mostly buttons).
I write all code in document.ready() part of code is separate js file. What make me furious is 0,5 s between start loading page and end of loading when all buttons have ugly html default style. I havn’t senn it on other web pages so I thins I am doing something wrong…
How to prevent that?
$(document).ready(function() {
$("#radio").buttonset();
$("#mapcontrols").buttonset();
}
You hide them at DOM loading and when all set then show them.
And use classes if you have multiple buttons.