jqueryfancybox-2

Fancybox options don't apply


I got this really basic code with options for Fancybox:

$(document).ready(function() {

    $(".publications a").fancybox({ 

        'autoDimensions' : false,
        'width' : 350,
        'autoScale' : false,
        'titlePosition' : 'over'
    });
});

And I got that html with content mostly from php (loop using while).

<div class="publications">
    <a title="My title" href="#data2">  Few text goes here </a> 

    <div style="display:none">
        <div id="data2">
            <h3>Abstract</h3>
            Some text goes here
        </div>
    </div>
</div> <br/>

The inline default fancybox is working good but I can't manage to apply any options on it. I wish I could resize it and move the title but it just simply not happenning.

Any clue?


Solution

  • Are you using Fancybox2 from here. If you are, you should look at their docs on how to properly use their plugin. I see that your code differs form their API.

    Also you should use Firebug for Mozilla Firefox (their console) or Chrome Developer Tools to see if you've made any JavaScript typos or mistakes.