Hi guys, Not sure if I'm just being fussy, but I'm running jQuery on an intranet site, and pages normally load almost instantly, even taking to account my own shoddy Javascript.
Whilst using jQuery, it takes sometimes up to two seconds to load a page and I'm not sure why. Could it be because I'm using the compressed version? Or are my calls to the functions breaking it? I've got something basic, quite simply: <script type="text/javascript"> // initialize the jquery code $(document).ready(function(){ //close all the content divs on page load $('#atRisk').hide(); $('#criteria').hide(); // regular toggle with speed of 'default' $('#toggle_atRisk').click(function(){ $('#atRisk').toggle('default'); }); // toggles the same div as above when the user clicks the checkbox $('#StaffNoOKPart1').click(function(){ $('#atRisk').toggle('default'); }); // regular toggle with speed of 'default' $('#toggle_criteria').click(function(){ $('#criteria').toggle('default'); }); // toggles the same div as above when the user clicks the checkbox $('#StaffNoOKPart2').click(function(){ $('#criteria').toggle('default'); }); }); </script> Am I doing something wrong? Or does jQuery generally take a second or two to load? Thanks