首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

高手解释一上这段代码

2013-01-19 
高手解释一下这段代码 $(#control).tooltip({// place tooltip on the right edgeposition: bottom cen

高手解释一下这段代码

 $("#control").tooltip({
    // place tooltip on the right edge
    position: "bottom center",
    // a little tweaking of the position
    offset: [-2, 10],
    // custom opacity setting
    opacity: 1,
    tip:"#controller",
    effect:"fade"
});
上面是jquery代码 下面是页面中的标签

<li id="control" class="monitor">
    <a style="cursor:pointer">监控台</a>
</li>

<div id="controller" class="tooltip">
。。。。。。。
</div>
[解决办法]
$("#control").tooltip({
   
    position: "bottom center",//放置位置
    
    offset: [-2, 10],//微调
    
    opacity: 1,//程度

    tip:"#controller",
     //<div id="controller" class="tooltip">
     //  。。。。。。。
     //  </div> 
    effect:"fade" // <div class="dtoolitp">的显示效果
});
[解决办法]
这个代码是设置鼠标滑过控件时显示的提示,上面的参数是设置提示的具体位置和内容的

热点排行