简体   繁体   English

使用 jquery 滑动时,一些 css 直到滑动后才适用

[英]When useing jquery slide some of the css doesnt apply until after the slide

I'm making an html5 website.我正在制作一个 html5 网站。 the page I'm encountering the issue is http://yamikowebs.com/blog.php right now I'm working on the copy/paste link.我遇到问题的页面是http://yamikowebs.com/blog.php现在我正在处理复制/粘贴链接。 when you click it the other links slide in from the left.当您单击它时,其他链接会从左侧滑入。 for some reason my anchors are underlined and display inline until the animation is done.由于某种原因,我的锚点带有下划线并显示为内联,直到 animation 完成。 is there a fix for this?有解决办法吗?

$(".blogLinks>article").hide(0);//hides all boxes
$("#blogDirectory>ul>li").click(function()
{
    switch ($(this).index())//check which one
    {
        case 1:
            $("[title=0]").show("slide", { direction: "left" }, 1000);//animate it
            break;
    }
});

While the animation is taking place, your div is wrapped in a temporary div with a class of ui-effects-wrapper .当 animation 发生时,您的 div 被包裹在一个临时 div 中,其中包含ui-effects-wrapper的 class 。 Once the animation is complete, your article element appears as a child of blogLinks and is styled appropriately, but until then, the article element is a child of .ui-effects-wrapper .一旦 animation 完成,您的article元素将显示为blogLinks的子元素并具有适当的样式,但在此之前, article元素是.ui-effects-wrapper的子元素。

Try applying the same style to .ui-effects-wrapper a尝试将相同的样式应用于.ui-effects-wrapper a

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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