My code below is not working when I click on to the editlist class element disappears how can I make it appear again such as toggling the editLish class element with clicks any change in the below will be much appreciated as the content is generated on the fly
<script type="text/javascript">
$(document).ready(function(){
alert("clicked");
$('.editList').on('click',function(){
alert('clicked');
$(this).hide();
});
});
</script>
<? $this->_renderView(false, '_submenu')?>
<?php $cand_data=$this->read_xml();
?>
<div class="module" style="width:1050px">
<div class="module_content">
<?php foreach($cand_data as $key=>$data_node){ $i=0; ?>
<table class="editList" style="">
<tr>
<th>Candidate Data</th>
</tr>
<?php foreach($data_node as $label=>$val) { if($i<16){?>
<tr>
<td><?= $label?></td>
<td><?= $val?></td>
</tr>
<?php $i++;}}?>
</table>
<?php }?>
</div>
</div>
editListin the DOM, but your selector calls for.editlist. The selectors are case-sensitive.