本帖最后由 walunwine 于 2012-12-04 17:11:51 编辑

解决方案 »

  1.   

    你这个什么框架?自己改下面的模型给suggestions添加mouseout事件,启动计时器10s后自动隐藏,再次移动进入suggestions时清除计时器
    var timer,span=10*1000;
    suggestions.onmouseout=function(){
      timer=setTimeout(function(){/*suggestions隐藏的代码*/},span);
    }
    suggestions.onmouseover=function(){clearTimeout(timer);}
      

  2.   


    这个是SHOPEX系统下的一个插件,所以应该是属于Mootools框架下的吧.我对JS不是很了解.
    <script>
    $ES('#suggestions').setStyle('display','block');     //弹出图层的样式
    $ES('#suggestions').fade('hide');       //默认图层隐藏
    function lookup(inputString) {
    if(inputString.length == 0) {               //如果INPUT内为0时自动隐藏
    $ES('#suggestions').fade('out');        //如果INPUT内为0时自动隐藏
    //jQuery('#suggestions').fadeOut();     // Hide the suggestions box
    } else {
    var req = new Request({                //这个变量是导入数据通过searchapi这个接口
      method: 'post', 
      url: 'plugins/widgets/livingsearch/searchapi.php', 
      data: { 'queryString' : inputString , 
    'lsIsCache': '<{$setting.lsIsCache}>',
    'lsCacheTime':'<{$setting.lsCacheTime}>',
    'lsIsCatalog':'<{$setting.lsIsCatalog}>',
    'lsIsGoodname':'<{$setting.lsIsGoodname}>',
    'lsIsGoodprice':'<{$setting.lsIsGoodprice}>'
    }, 
      onComplete: function(response) { 
      $ES('#suggestions').set('html',response);    //您刚才回复的MOUSEOUT应该是添加到什么地方呢?
      } 
    }).send();
    $ES('#suggestions').fade('in'); // Show the suggestions box
    }
    }
    </script>
    谢谢您的回复
      

  3.   


    版主你好。还劳烦你帮我看一下。刚在淘宝上找了一圈号称修改JS的.没有说可以的.要不就漫天喊价.
    我的是SHOPEX系统 是属于MOOTOOLS框架的.
    现在只是想鼠标留在下拉菜单上就不隐藏.如果鼠标离开就隐藏.
    9987542c.ysb148b.84684.net这个是测试站首页左侧的一个红叉的地方就是问题所在.
    麻烦了.谢谢
      

  4.   


    问题已经解决.从外面引入了一个JS文件替换掉了
    $ES('.spotToogleDisplay').each(function(item,index){
        item.addEvents({                                    
            'mouseleave':function(){
                this.fade('out');
                $ES('.topbtn a')[index].set('class',oriClass[index]);
                },
            'mouseenter':function(){
                //$ES('.topbtn a')[index].set('class',oriClass[index]+'_over'); 
                }
        });                                 
    });