javascript - Checkbox From Json is not showing alert when clicked -


i passing check box input json html, , when checkbox clicked showing alert , not working. code

 $aroundcheck='<div id="content">';foreach ($checklocation $checklocation) {    $aroundcheck.='<input type="checkbox" name="check[]"/>'.$checklocation->id_object;  }  $aroundcheck.='</div>';  $result = array('status' => 'ok', 'content' => $aroundcheck);  echo json_encode($result); 

the javascript

$('input=[name="check[]"]').click(function(){ alert("something");}); 

anybody know? me im stuck 2 days


Comments

Popular posts from this blog

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

python - TypeError: start must be a integer -

html - href attribute breaking an element -