Javascript Problem after Submit

Javascript Problem after Submit

hi,

im using jquery mobile + ruby on rails 3.

after a submit  and redirect back, the javascript is not really working.

for example:

i have some checkboxes, if one checkbox is checked, the others should be disabled.

  1.       <script type="text/javascript">
  2.         alert("FIRST ALERT");
  3.           $('#checkbox-evaluierung-einmal').change(function(){
  4.             alert("SECOND ALERT");
  5.               if (this.checked) {
  6.                   $('#checkbox-montag').prop('disabled', true, this.checked);
  7.                   $('#checkbox-dienstag').prop('disabled', true, this.checked);
  8.                   $('#checkbox-mittwoch').prop('disabled', true, this.checked);
  9.                   $('#checkbox-donnerstag').prop('disabled', true, this.checked);
  10.                   $('#checkbox-freitag').prop('disabled', true, this.checked);
  11.                   $('#checkbox-samstag').prop('disabled', true, this.checked);
  12.                   $('#checkbox-sonntag').prop('disabled', true, this.checked);
 
the first alert is fireing, but the scond not!

my workaround was to reload the page after the redirect 'again'.

I've tried "rel" => "external" or "data-ajax" = "false".

datepicker is also not working:

  1. $(function() { $("#datepicker").datepicker({ dateFormat: 'dd.mm.yy' }).val(); });