views:

151

answers:

1

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 -->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;

 <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"&gt;www.savethechildren.org&lt;/a&gt;&lt;/p&gt;

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

</div>

    <!-- further down the page -->

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

Any help would be massively, appreciated.

A: 

Figured out the problem.

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

Now works.

Oldie