选中输入框时,我的表似乎没有淡入。
jQuery代码:
$(document).ready(function () {
var weightSetArray = ["HH_Cancer", "Global Warming", "Acidification", "HH_Respiratory", "HH_Noncancer", "Ozone Depletion", "Eutrophication", "Smog", "Embodied Energy", "Land Use", "Water Consumption", "Sum"];
$("#weightsetcheckbox").click(function () {
if ($("#weightsetcheckbox").is(':checked')) {
$("#weightsetContainer").append("<table class=table id=weightsetTable></table>");
$.each(weightSetArray, function (index, value) {
name = value;
name = name.replace(/\s+/g, '');
$("#weightsetTable").append('<tr><td>' + value + '</td><td><input type=number min=0 max=100 placeholder=0 name=name></td></tr>');
});
$("#weightsetTable").fadeIn('slow');
}
else {
$('#weightsetTable').remove();
}
});
});