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

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -