开发者

Fancybox plugin - overlay options problem

I am using the fancybox plugin http://fancybox.net

I am trying to change the overlay options as detailed in the documentation, but no matter what I change the overlay options remain default.

Here's what I have:

<!-- header -->

&开发者_Go百科lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

 <script type="text/javascript" src="/net/js/fancybox/jquery.fancybox-1.3.1.pack.js"></script>

 <script type="text/javascript">

    $(document).ready(function(){

        $("#fancybox_trigger").fancybox().trigger('click');

        $("a#fancybox_trigger").fancybox({

            'overlayShow':  true,
            'overlayOpacity': 0.5,
            'overlayColor': '#000',
            'height': 557,
            'width': 785,
            'scrolling': 'no'
        });

    });

</script>

<link rel="stylesheet" href="/net/js/fancybox/jquery.fancybox-1.3.1.css" type="text/css" media="screen" />

    <!-- body -->

    <div style="display:none">


    <div id="fancybox_wrapper">
        <h2>Pakistan flood appeal</h2>
        <hr />
        <div id="fancybox_content">
            <div id="fancybox_content_text">
                <p>More than 1400 people in Pakistan have been killed and millions left homeless as a result of flash floods and landslides caused by torrential monsoon rains. To help support the people who have been affected please visit:</p>

                <p><a href="http://www.savethechildren.org">www.savethechildren.org</a></p>

            </div>
        </div>
    </div>

</div>

    <!-- further down the page -->

    <a href="#fancybox_wrapper" id="fancybox_trigger"></a>

Any help would be massively, appreciated.


Figured out the problem.

I was declaring the fancybox plugin twice, removed the second instance and placed options within the first instance.

Now works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜