Spring form:checkbox jquery event handle -
i use jquery 1.9 , spring 3.1.2. have next code in jsp:
<form:checkbox path="phonebankchannel" />
and have next code in js:
function ischeckedbankchannel() { if ($('#phonebankchannel').is(':checked')) { alert("show something"); } else { alert("hide something"); } }
problem approach not work. works when add id attribute form:checkbox. can me ?
try attribute selector
$('input[path="phonebankchannel"]').is(':checked')) { .....
Comments
Post a Comment