How to speed up the execution of jquery in the body of an ASP page

Iruxos

New Member
I am running some jquery in the body of an asp file. Immediately after it is the drop down menu that it effects. The script works fine, the issue is it takes a while to load the script in firefox.How can I speed this up without moving it higher up in the body or header.Please note: The link provided is the live website, I am aware that it is firing an object error back because I havea old version of jQuery. (On our internal website the jquery is the latest version)Link:http://www.casa.gov.au/scripts/nc.dll?WCMS:PWA::pc=PC_91330The code is below: \[code\]<script> $(document).ready(function() { $(document).on("change","select#state",function(e){ $("form#state").submit(); }); });</script> <form id="state" action="avsafety.asp" method="get"> <p>State:<br/> <select id="state" name="state"> <option label="ACT" value="http://stackoverflow.com/questions/14513969/ACT" <%if request.querystring("state") = "ACT" then response.write("selected") %>>ACT</option> <option label="NSW" value="http://stackoverflow.com/questions/14513969/NSW" <%if request.querystring("state") = "NSW" then response.write("selected") %>>NSW</option> <option label="NT" value="http://stackoverflow.com/questions/14513969/NT" <%if request.querystring("state") = "NT" then response.write("selected") %>>NT</option> <option label="QLD" value="http://stackoverflow.com/questions/14513969/QLD" <%if request.querystring("state") = "QLD" then response.write("selected") %>>QLD</option> <option label="VIC" value="http://stackoverflow.com/questions/14513969/VIC" <%if request.querystring("state") = "VIC" then response.write("selected") %>>VIC</option> <option label="SA" value="http://stackoverflow.com/questions/14513969/SA" <%if request.querystring("state") = "SA" then response.write("selected") %>>SA</option> <option label="TAS" value="http://stackoverflow.com/questions/14513969/TAS" <%if request.querystring("state") = "TAS" then response.write("selected") %>>TAS</option> <option label="WA" value="http://stackoverflow.com/questions/14513969/WA" <%if request.querystring("state") = "WA" then response.write("selected") %>>WA</option> </select> <noscript><input type="submit" value="http://stackoverflow.com/questions/14513969/Search" /></noscript> </p> </form>\[/code\]
 
Back
Top