在我的on
点击功能中,如何才能使我的div #complete-tick
的css类为display:block;
?
代码:
$('[data-popup-complete]').on('click', function(e) {
var targeted_popup_class = jQuery(this).attr('data-popup-complete');
$('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
$('[data-popup="' + targeted_popup_class + '"]').css({ display: "block" });
e.preventDefault();
});
答案 0 :(得分:1)
试试这个:
$('[data-popup-complete]').on('click', function(e) {
var targeted_popup_class = jQuery(this).attr('data-popup-complete');
$('[data-popup="' + targeted_popup_class + '"]').fadeOut(350);
$('[data-popup="' + targeted_popup_class + '"]').css('display', 'block');
e.preventDefault();
});