I'm trying to position the fancybox that is inside a Facebook app with scrolling disabled.
The onComplete function works for a fraction of a second before going back to the vertical center of the frame. What is making it snap back to the center?
$("#footer-test-link").fancybox({
"transitionIn" : "fade",
"transitionOut" : "fade",
"speedIn" : 300,
"speedOut" : 300,
"easingIn" : "fade",
"easingOut" : "fade",
"type": "ajax",
"overlayShow" : true,
"overlayOpacity" : 0.3,
"titleShow" : false,
"padding" : 0,
"scrolling" : "no",
"onComplete" : function() {
$("#fancybox-wrap").css({"top": 80 +"px"});
}
});
just try to set the css-property of '#fancybox-wrap' like following
the !important-option ensure that jQuery or an other JavaScript isn't able to change/override this css-setting.