문제

I can't seem to make the jQueryUI explode effect work. Here's a jsfiddle I tried. Usually when I try the element hides with no explosion effect whatsoever, the jsfiddle just looks strange exploding.

$('h1, h2').click(function() {
    $(this).hide('explode');
});

The jQueryUI docs on the explode effect are not very clear on how to use it.

Am I doing something wrong?

도움이 되었습니까?

해결책

You can fix it by putting more text. Here is a jsfiddle https://jsfiddle.net/k380zpgx/. By the way use this code instead it gives you more control of the effect.

$('h1, h2').click(function() {
    $(this).hide( "explode", {pieces: 16 }, 2000);
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top