aboutsummaryrefslogtreecommitdiffstats
path: root/www/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-10-26 10:47:28 +0100
committerStruan Donald <struan@exo.org.uk>2012-10-26 10:47:28 +0100
commit71d689b6b43f1632aaba62e9999fb8ed887aaf78 (patch)
tree0073e38fefa4f4842741842115e13a2c8bb35646 /www/js
parent3bfe5427d26b9b739caeafecf79b5496b13e7ef9 (diff)
tie the locate me automatically button to front page pageshow event
Diffstat (limited to 'www/js')
-rw-r--r--www/js/fixmystreet.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/www/js/fixmystreet.js b/www/js/fixmystreet.js
index 282e3f4..dac2efb 100644
--- a/www/js/fixmystreet.js
+++ b/www/js/fixmystreet.js
@@ -77,6 +77,14 @@ function tabs(elem, indirect) {
}
+$(document).delegate( '#front-page', 'pageshow', function(event, ui) {
+ // Geolocation
+ if (geo_position_js.init() && !$('#geolocate_link').length) {
+ $('#postcodeForm').after('<a href="#" id="geolocate_link">&hellip; or locate me automatically</a>');
+ $('#geolocate_link').click(getPosition);
+ }
+});
+
$(document).bind('pageinit', function(){
var $html = $('html');
@@ -260,12 +268,6 @@ $(document).bind('pageinit', function(){
$('#form_category').change( form_category_onchange );
- // Geolocation
- if (geo_position_js.init() && !$('#geolocate_link').length) {
- $('#postcodeForm').after('<a href="#" id="geolocate_link">&hellip; or locate me automatically</a>');
- $('#geolocate_link').click(getPosition);
- }
-
/*
* Report a problem page
*/