jquery tools系列 expose 学习

2020-05-24 21:19:52易采站长站整理

</div>
<script type=”text/javascript”><!–
$(function(){
    var testApi=$(“#test”).expose({
            color:’#44f’,
            opacity:0.5,
            loadSpeed:2000,
            closeSpeed:3000,
            closeOnClick:false,
            closeOnEsc:false,
            api: true,
            lazy:true,
            onBeforeLoad:function(){
                alert(“before load!”);
            },
            onLoad:function(){
                alert(“onLoad!”);
            },
            onBeforeClose:function(){
                alert(“mask-background:”+this.getMask().css(“color”)+”,exposeId:”+this.getExposed().attr(“id”)
                                    +”n expose color:”+this.getConf().color);
                //alert(“Before close!”);
            },
            onClose:function(){
                alert(“Close!”);
            }
        });
        
    $(“#test”).click(function() {
        testApi.load();
    });
    $(“#btn_open”).click(function(){
        testApi.load();