I have following php code :
<tr class="delete_ex_ph_label_data">
<td align="left">
<select name="phone_label_ex[]" class="select2 work_phone_class">
<option value="">--Select--</option>
<?php
$get_orderby = mysqli_query($link, "SELECT order_type FROM contact_label_type");
$get_orderby_re = mysqli_fetch_array($get_orderby);
$ph_orderby = $get_orderby_re['order_type'];
$get_label_type = mysqli_query($link, "SELECT * FROM contact_label_type WHERE clid = '1' ORDER BY order_type $ph_orderby");
while($get_label_type_re = mysqli_fetch_array($get_label_type)){
$label_type_id = (int) $get_label_type_re['ctid'];
$label_type = inputvalid($get_label_type_re['contact_label_type']);
if($ctid_d_cl == $label_type_id){
$sel = 'selected="selected"';
}else{
$sel = '';
}
echo "<option value=' $label_type_id' $sel> $label_type</option>";
}
?>
</select>
</td>
<td align="right">
<input type="text" name="phone_label_value_ex[]" class="small3 work_phone_class" id="work_phone" placeholder="phone"value="<?php echo $data_cl; ?>" />
<input type="hidden" name="ctid" value="<?php echo $ctid_d_cl; ?>">
<input type="hidden" name="label_id" value="1">
<input type="hidden" name="phone_label_cdid_ex[]" value="<?php echo $cdid_d_cl; ?>">
<input type="hidden" name="phone_mid[]" value="<?php echo $id_d_cl; ?>">
<spam class="delete_ex_ph_label"><a href='#'> X</a></spam>
</td>
</tr>
Which showing bellow image :
Now when I click (+) sign it showing (X) sign to each row, Like bellow image :
Now I want to remove/hide each row by clicking on (X) sign. So that I am using following jquery code :
$(".delete_ex_ph_label", $(this)).on('click', function() {
$(".delete_ex_ph_label_data", $(this)).remove();
});
But it's not removing, How can I remove each row by clicking on (X) sign ?

