I made a code to pass through a table and made a total of each number in a specific column. Everything's working fine in Chrome/Firefox/Safari even IE 9 and IE 10. But this is not working in IE 11. The code don't append the sentences.
Here's the code
jQuery(document).ready(function(){
total = 0;
total_continue = 0;
jQuery('#qqp_profile_meta_box_r_profile_formation table tbody tr').each(function(){
if(jQuery(this).hasClass('the_header_row') || jQuery(this).hasClass('the_template_row') || jQuery(this).hasClass('the_final_row') ){
// Nothing for the moment
}else{
total = parseFloat(total) + parseFloat($('td input',this).val());
}
});
jQuery('#qqp_profile_meta_box_r_profile_formation').append("<p class='total-heure-formation' style='margin-left:63%;font-size:12px;font-weight:bold'>Total : " + total + " heures de formation</p>");
jQuery('#qqp_profile_meta_box_r_profile_formation').append("<p class='total-heure-formation-continue' style='margin-left:63%;font-size:12px;font-weight:bold'>Total : " + total_continue + " heures de formation continue (" + total_continue * 2.0 + " unités)</p>");
jQuery('#qqp_profile_meta_box_r_profile_formation').append("<input name='total-heure-formation-continue' class='input-formation-continue' type='hidden' value='" + total_continue + "' /> ");
});
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire