php - disable a submit button after clicking on it in codeigniter -


i'm new php , codeigniter. have task i'm working on right hostel management system. student has ability choose meal want eat selecting on it, im trying disable select button after click on it, in other words student can choose specific meal once.

here's code:

<td><div><?php echo $row['type'];?></div></td <td><div><?php echo $row['content'];?></div></td> <td><div><?php echo $row['date'];?></div></td>   <td align="center">  <?php $is_selected=$this->db->get_where('selected_meal', array( 'meal_id' => $row['meal_id'],'student_id'=>$this->session->userdata('student_id')))->row()->delivered;    <a data-toggle="modal" href="#modal-form" onclick="modal('order_meal',<?php echo  $row['meal_id'];?>)" class="btn btn-gray btn-small"> <i class="icon-wrench"></i> <?php echo get_phrase('select');?>   </a>    <?php  ?>         </td> 

give class element, want select. ex 'select-meal'.

$('.select-meal').click(function(){      $(this).attr('disabled', 'true'); }) 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -