0

Update :Ok this problem is solved now . and it was due to my silly mistake on cookies this was happened , thanks all for help

I am facing a very strange problem , actually i have added a domain [http://www.mickesutmaning.se/] to my hostmonster server as addon and link it folder linkdoo.com/oc My problem is fancybox is working on linkdoo.com/oc but not on http://www.mickesutmaning.se/

please help me

 $.fancybox.open({
    href : 'http://socialnetworkdeal.com/code_paste.php?c_id='+id,
    type : 'iframe',
    padding : 5,
    scrolling : 'no'
}
vinayrks
  • 817
  • 1
  • 9
  • 12

1 Answers1

0

I have a wild guess (since I've run into this) - when switching domains, the browser will recache all your files. Since index.php is being called first, fancybox might be getting called before the fancybox.js is loaded.

Try wrapping your fancybox call with jQuery's document ready function like this:

$(document).ready(function() {
    $.fancybox.open({
        href : 'http://socialnetworkdeal.com/code_paste.php?c_id='+id,
        type : 'iframe',
        padding : 5,
        scrolling : 'no'
    });
});

This allows jQuery to wait until all the files are loaded before trying to instantiate fancybox. Please let me know if this works. If you still have trouble after trying this, please provide a code sample.