简体   繁体   中英

Issues using JQuery SlideToggle

Im getting a "Flicker" effect while using SlideToggle:

        $("#Box").children().hide();
        $(".Box_Child").stop(true, true).slideToggle(1500);

Where there are roughly 10 or so ".Box_Child"

I'm using JQuery 1.9.1 All Browsers produce the effect. The above causes the div to hide, slide up, and then reappear instead of hiding and then sliding down. Any help would be much appreciated.

Here's a fiddle: http://jsfiddle.net/SxRQN/1/

Sorry for the nonsense @Kevin B and @j08691, it seems as though that particular animation did not like the fact that I had the block display listed as important. It was most likely conflicting with the css modification and ultimately the direction of the animation. SlideToggle automatically finds whether your div is positioned up or down.

To fix the fiddle, and my page, I just removed !important.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM