I use the following widget
http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/
So far it has worked fine, but I need help in adding attributes. When using Firebug, I noticed that just by clicking on the checkmark, the verified attribute does not appear as I would expect. In my code, I changed the widget, I was able to add code to remove the checked attribute.
this.removeAttribute(\'checked\'); this.checked=false;
if the item has been checked in advance. I managed to use this code
this.setAttribute(\'checked\', \'checked\'); this.checked=true;
if the item was not marked when loading the page.
My problem arises when I need to use both sets of code in this checkbox, I tried to execute the following
onclick="if($(this).attr(\'checked\') == \'true\') { this.setAttribute(\'checked\', \'checked\'); this.checked=true; } else { this.removeAttribute(\'checked\'); this.checked=false; }
the code will remove the checked attribute (if the flag is set before loading on the page), but when I try to click this flag to add the attribute (if it is not set when the page loads), nothing happens.
Thanks for any help and sorry for my poor coding.
Chris source
share