opentip 默认显示 定位不准

opentip使用引入opentip.css,jquery.js opentip-jquery.min.js

//页面body
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
        1<br>
       <div id="showClick" style="background:red;">Click me</div>

//默认显示

<script>

 $(function(){

        var myOpentip = new Opentip("#showClick");

             myOpentip.setContent("tip-sss");   

             myOpentip.show();

    });

</script>

//------打开页面后,提示直接显示在左上角

//添加target及tipJoint修改后正常显示

<script>

$(function(){

        $("#showClick").opentip("tip-sss",{style:'glass',target: "#showClick",tipJoint: "bottom"}).show();

});

</script>

猜你喜欢

转载自my.oschina.net/u/210357/blog/760160