jQuery轮播插件

| 我在我的应用程序中使用Carousel jquery插件。我需要显示一个名字。它在IE中正确显示了名称,但在mozilla中却未正确显示。 这是我的代码:
function mycarousel_itemVisibleInCallbackAfterAnimation(carousel, item, idx, state) { 
   if (document.getElementById(\"Id\") != null) {
      if (item.all) {
         if (item.all[1]) {
            if (item.all[1].childNodes) {
               document.getElementById(\"Id\").innerHTML =
                     item.all[1].childNodes[0].alt;
            }
         }
      }
   }
};
有人可以帮我吗。     
已邀请:
由于您已经有了jQuery参考,因此为什么不使用它呢?
function mycarousel_itemVisibleInCallbackAfterAnimation(carousel, item, idx, state) { 
   if(jQuery(\'#\' + idx)[0] && jQuery(item.all[1]).children()[0]){
     jQuery(\'#\' + idx).html( jQuery(jQuery(item.all[1]).children()[0]).attr(\'alt\'));
   }
};
    

要回复问题请先登录注册