$(function() { $( "#chbBlogsLabelsList input" ).on( "click", function() { if($(this).is(":checked")) { $(this).next().addClass("qqqq");} else {$(this).next().removeClass("qqqq");} }) });