Here I have a demo of Jquery slideToggle core working on an element, but jquery Slide UI not.
这里我有一个关于元素的Jquery slideToggle核心的演示,但jquery Slide UI没有。
Please look at the demo, the Jquery UI button works for the above text, but not for the google logo. The slideToggle button works for the logo.
请查看演示,Jquery UI按钮适用于上述文本,但不适用于Google徽标。 slideToggle按钮适用于徽标。
How would I get the Jquery UI slide to work with the logo as well?
我如何获得Jquery UI幻灯片以使用徽标?
Thanks.
And hopefully this can be done without changing the DOM.
希望这可以在不改变DOM的情况下完成。
1 个解决方案
#1
I checked your code and I think the problem is because is the image is added an inline styled background of the span. This appears to be is messing up with slide effect.
我检查了你的代码,我认为问题是因为图像是添加了跨度的内联样式背景。这似乎搞乱了幻灯片效果。
However, this works fine if you apply the effect on the container DIV instead. See here: http://jsbin.com/aluwu
但是,如果您将效果应用于容器DIV,则此方法可以正常工作。见这里:http://jsbin.com/aluwu
So, this works fine:
所以,这很好用:
$('#container').effect("slide", {}, 1000);
Instead of this:
而不是这个:
$('span.image').effect("slide", {}, 1000);
#1
I checked your code and I think the problem is because is the image is added an inline styled background of the span. This appears to be is messing up with slide effect.
我检查了你的代码,我认为问题是因为图像是添加了跨度的内联样式背景。这似乎搞乱了幻灯片效果。
However, this works fine if you apply the effect on the container DIV instead. See here: http://jsbin.com/aluwu
但是,如果您将效果应用于容器DIV,则此方法可以正常工作。见这里:http://jsbin.com/aluwu
So, this works fine:
所以,这很好用:
$('#container').effect("slide", {}, 1000);
Instead of this:
而不是这个:
$('span.image').effect("slide", {}, 1000);