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.
- <script type="text/javascript">
- alert("FIRST ALERT");
- $('#checkbox-evaluierung-einmal').change(function(){
- alert("SECOND ALERT");
- if (this.checked) {
- $('#checkbox-montag').prop('disabled', true, this.checked);
- $('#checkbox-dienstag').prop('disabled', true, this.checked);
- $('#checkbox-mittwoch').prop('disabled', true, this.checked);
- $('#checkbox-donnerstag').prop('disabled', true, this.checked);
- $('#checkbox-freitag').prop('disabled', true, this.checked);
- $('#checkbox-samstag').prop('disabled', true, this.checked);
- $('#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:
$(function() { $("#datepicker").datepicker({ dateFormat: 'dd.mm.yy' }).val(); });