I have the following scriptthat runs on $(document).ready where the script alter some form elements such as radio buttons.
When the form is updated via JQuery ,the script is not run.
I need the script to alter radio buttons after successful AND unsuccessful form submissions.
Here is a link to my test site:http://test2.bratpaks.co.za/home
(function($) {
Drupal.behaviors.icheck = {
attach: function (context, settings) {
$('input[type=radio]', context).each(function(){
var label = $(this).next(),
var label_text = label.text();
label.remove();
$(this).iCheck({
checkboxClass: 'icheckbox_line-realred',
radioClass: 'iradio_line-realred',
insert: '<div class="icheck_line-icon"></div>' + label_text
});
});
}
};
})(jQuery);