From 6ef19d7e1876bb1f5ab806f7b6dedae19b9da3ee Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 1 Oct 2012 19:22:39 -0700 Subject: [PATCH] Remove unnecessary $(window).load() callbacks All this is already inside a $(document).ready() callback. --- app/assets/javascripts/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 9a05ae1dd..2216a0352 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -17,7 +17,7 @@ $(document).ready(function () { map.zoomToExtent(proj(bbox)); if (params.box) { - $(window).load(function() { addBoxToMap(bbox) }); + addBoxToMap(bbox); } } else { setMapCenter(new OpenLayers.LonLat(params.lon, params.lat), params.zoom); @@ -39,7 +39,7 @@ $(document).ready(function () { url += "/full"; } - $(window).load(function() { addObjectToMap(url, params.object_zoom) }); + addObjectToMap(url, params.object_zoom); } handleResize(); -- 2.39.5