jQuery(document).ready(function ($) { $('.chk').change(function () { if ($(this).prop('checked')) { //Do stuff alert('0'); var selectitem = parseInt($(this).closest('.accordion-group').find('.selectitem').text()); if (selectitem != 0) { $(this).closest('.accordion-group').find('.selectitem').text(selectitem - 1); } else { $(this).closest('.accordion-group').find('.select').show(); } } else { var selectitem = parseInt($(this).closest('.accordion-group').find('.selectitem').text()); $(this).closest('.accordion-group').find('.selectitem').text(selectitem + 1); $(this).closest('.accordion-group').find('.select').show(); } }); });
$(this).is(':checked')
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)