Trigger change on last select element to show Delete option

This commit is contained in:
Brian Miyaji
2013-12-31 04:35:10 +11:00
parent 6d40c687ea
commit 364faf04cd

View File

@@ -69,7 +69,7 @@ jQuery(document).ready(function($){
if($(this).val() == '') $(this).remove(); if($(this).val() == '') $(this).remove();
}).find('option:first').text($(this).attr('data-remove-text')); }).find('option:first').text($(this).attr('data-remove-text'));
if($(this).val() != '') { if($(this).val() != '') {
$(this).before($(this).clone().val($(this).val())).val(''); $(this).before($(this).clone().val($(this).val())).val('').change();
} }
}); });