/* ===========================================================================
*
* Elqua Checkbox Populator
* Version 1.0
* Checks value of checkbox. If the value of the checkbox is any of '1', 'yes', 'checked' or 'on', it adds the 'checked' attribute to
* the checkbox.
*
* Author: Adrian Lyons
* Author email: adrian.lyons@eloqua.com
* ---------------------------------------------------------------------------
*
*SUPPORT:
*
* Released as is. No direct support is provided regarding the use of or editing of this plugin.
* No support is provided by Eloqua for the jQuery framework.
*
*RELEASE HISTORY:
* v 1.0 - Initial Release
*
*---------------------------------------------------------------------------
*
* How To OF USE:
* Upload a copy of the jQuery JS Library and the Eloqua chkbox plugin to your content upload section. Use the direct link to the file
* and add the link to the file in your landing page.
*
* Add the following lines to the header scripts file
*
*
*
*
*/
jQuery.chkbox = function(name){
$('input:checkbox').each(function(){
thisval = $(this).val();
if (thisval == '1' || thisval == 'yes' || thisval == 'on' || thisval == 'true' || thisval == 'checked'){
$(this).attr('checked', true);
}
else{
$(this).attr('checked', false);
};
});
}