0

我使用 JQuery Tools 的覆盖功能。

我的问题是,我想在一个叠加层中有一个链接,以便在关闭现有叠加层的同时打开另一个叠加层。

我怎样才能让它工作?

<a href="#" class="takeatour" rel="#sitetour1">Site tour</a>

<div class="overlay" id="sitetour1">
Step 1 <a href="#" rel="#sitetour2">Click here to learn more</a>
</div>
<div class="overlay" id="sitetour2">
Step 2
</div>


        $("a[rel]").each(function(i) { 
            $(this).overlay({ 

                // common configuration for each overlay 
                oneInstance: false,  
                closeOnClick: true,     
                expose: '#3FB8AF',
            });             
        }); 
4

1 回答 1

0

添加这个:

$('a[rel=#sitetour2]').click(function(e) {
    $('a[rel=#sitetour1]').overlay().close();
});

​</p>

于 2012-06-05T13:22:31.477 回答