2

我查看了我能找到的所有教程,检查了这里的问题并阅读了 jQuery UI Tabs 源代码,但我仍然无法弄清楚这一点。

我的目标是有一个旋转的内容框,在导航数字上具有 fx 淡入淡出和鼠标悬停效果。

你可以在这里看到几乎可以工作的版本:http:
//www.chesapeakelifemag.com/index.php/cl_new/index

如您所见,鼠标悬停有效,旋转有效,但效果不会显示。这是我正在使用的代码

$(document).ready(function(){
  $("#content_slider").tabs(
          {event: 'mouseover'}).tabs(
          { fx: [{opacity: 'fadeOut', duration: 'slow'},
          {opacity: 'toggle', duration: 'fast'}] }).tabs(
         'rotate', 5000, true);
  });

我觉得我正在将大量参数串在一起,这些参数都应该进入一个 .tabs() 函数,但是当我尝试 mouseover、fx 或旋转的功能时会中断。

有人有答案吗?

$(document).ready(function(){
$("#content_slider").tabs({event: 'mouseover', 
        fx: [{opacity: 'fadeOut', duration: '100'}, 
             {opacity: 'toggle', duration: 'fast'}]}).tabs(
        'rotate', 7000, true);
});'
4

1 回答 1

1

尝试以下格式:

$(document).ready(function() {
    $("#content_slider").tabs({
        event: 'mouseover',
        fx: {
            opacity: 'toggle',
            duration: 'slow'
        }
    }).tabs('rotate', 5000, true);
});

I use tabs in an application and I added the above fx property and it worked. I'm not certain that your script structures the effects correctly.

于 2009-10-06T02:35:27.283 回答