aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/fixmystreet.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/fixmystreet.js')
-rw-r--r--web/js/fixmystreet.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index b1a8f1889..834aa4ed3 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -8,7 +8,7 @@ function form_category_onchange() {
var args = {
category: cat.val()
};
-
+
if ( typeof fixmystreet !== 'undefined' ) {
args.latitude = fixmystreet.latitude;
args.longitude = fixmystreet.longitude;
@@ -159,8 +159,9 @@ $(function(){
timer = window.setTimeout(email_alert_close, 2000);
});
-
- $('#form_category').change( form_category_onchange );
+ // Using delegate here because we *might* be running under a cobrand which isn't jQuery 1.7+
+ // Delegation is necessary because #form_category may be replaced during the lifetime of the page
+ $("#problem_form").delegate("select#form_category", "change", form_category_onchange );
// Geolocation
if (geo_position_js.init()) {