# HG changeset patch # User luisf # Date 1365523697 -3600 # Node ID 827705e14b3ba858d29a4141b13c59e1233a23c0 # Parent 90d92ad3fc59dcaee4fa678255ef5b648f5073f9 Ported more javascript to jquery diff -r 90d92ad3fc59 -r 827705e14b3b public/javascripts/ssamr_registration.js --- a/public/javascripts/ssamr_registration.js Tue Apr 09 17:06:21 2013 +0100 +++ b/public/javascripts/ssamr_registration.js Tue Apr 09 17:08:17 2013 +0100 @@ -3,13 +3,12 @@ /* SSAMR specific functions */ /* institution related functions */ -Event.observe(window, 'load', - function() { - if(!$('ssamr_user_details_institution_type_true').checked && $('ssamr_user_details_institution_type_true').checked){ - $('ssamr_user_details_other_institution').disable(); - $('ssamr_user_details_institution_id').enable(); - $('ssamr_user_details_institution_type_true').checked = true; - $('ssamr_user_details_institution_type_false').checked = false; +$(document).ready(function(){ + if(!$('#ssamr_user_details_institution_type_true').checked && $('#ssamr_user_details_institution_type_true').checked){ + $('#ssamr_user_details_other_institution').attr('disabled', 'disabled'); + $('#ssamr_user_details_institution_id').removeAttr('disabled'); + $('#ssamr_user_details_institution_type_true').checked = true; + $('#ssamr_user_details_institution_type_false').checked = false; } } );