I have a checkbox array
<input id="c1" type="checkbox" name="hour[]" class="create-daily" value="1" /><br />
<input id="c2" type="checkbox" name="hour[]" class="create-daily" value="2" /><br />
<input id="c3" type="checkbox" name="hour[]" class="create-daily" value="3" /><br />
This is my JavaScript
$(".create-daily").live("click",function(){
if ($( ".create-daily" ).attr("checked")){
$( "#form_input" ).dialog( "open" );
}
});
When I check the first checkbox, the dialog shows, when I check first checkbox and then check second checkbox, the second checkbox is shown…
…but when I check the second checkbox without having checked the first checkbox the dialog is not shown, can you help me?
How can I show the dialog when I check one of the checkboxes (for example chekbox number 3) without checking the first one?
Thanks in advance
Use this to get the element that was actually clicked: