aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js')
-rw-r--r--web/js/fixmystreet.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index 3d248a5dc..33d2a0a0f 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -73,7 +73,15 @@ $(function(){
// we do this to stop things jumping around on blur
success: function (err) { if ( form_submitted ) { err.addClass('label-valid').html( ' ' ); } else { err.addClass('label-valid-hidden'); } },
errorPlacement: function( error, element ) {
- element.parent('div').before( error );
+ /* And all because the .before thing doesn't seem to work in
+ mobile safari on iOS 5. However outerHTML is not cross
+ browser so we have to have two solutions :( */
+ if ( element[0].outerHTML ) {
+ var html = element.parent('div').html();
+ element.parent('div').html( error[0].outerHTML + html );
+ } else {
+ element.parent('div').before( error );
+ }
},
submitHandler: function(form) {
if (form.submit_problem) {