diff --git a/css/prettyCheckboxes.css b/css/prettyCheckboxes.css index 15c9cf6..a7c318f 100644 --- a/css/prettyCheckboxes.css +++ b/css/prettyCheckboxes.css @@ -19,7 +19,8 @@ label.checked span.holder, label.checked:hover span.holder, label.checked:hover span.holder { top: -42px !important; } /* Background position when checked */ - + + .disabled { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } /* ------------------------------------------------------------------------ Customize at your own risk diff --git a/index.html b/index.html index 8d31a2d..19f6f2e 100644 --- a/index.html +++ b/index.html @@ -31,9 +31,9 @@ - + - + diff --git a/js/prettyCheckboxes.js b/js/prettyCheckboxes.js index de5a3db..eefb285 100644 --- a/js/prettyCheckboxes.js +++ b/js/prettyCheckboxes.js @@ -39,6 +39,11 @@ // Associate the click event $label.bind('click',function(){ + // Do not check label if the input is disabled + if($('input#' + $(this).attr('for')).is(':disabled')){ + return false; + } + $('input#' + $(this).attr('for')).triggerHandler('click'); if($('input#' + $(this).attr('for')).is(':checkbox')){