I have a select with option value of *|||*
. When I split this value it seems the *
cannot be stored in label id
. If I change the value to xxx|||yyy
the value is stored. This is some of my script:
var tujuan = $(this).val().split('|||');
var val_t = tujuan[0];
var txt_t = tujuan[1];
txt_tujuan = "<label id='"+val_t+"' class='label label-primary lbl_txt' cursor:pointer;'>";
txt_tujuan += txt_t
txt_tujuan += "</label>";
$('#d_tujuan').find('label').each(function(){
curr_label = $(this).attr('id');
alert(curr_label);
});