Skip to content

Added option to allow positioning to work in a Facebook iFrame (page tab or app) #93

Open
wants to merge 5 commits into from

2 participants

@localpcguy

Added the inFBiframe boolean option, and code that checks for the Facebook FB object (from the Facebook Javascript SDK) so that the Colorbox positioning can be used within a Facebook tab or app iframe. If both conditions are met (option = true and FB object exists), my update will use FB.Canvas.getPageInfo() to get the initial scrollTop/scrollLeft values as Facebook does not give the proper window.scrollTop/window.scrollLeft values (both are 0 by default.)

(Please ignore the changes to the minified file, it is not up to date with the changes to this main file and was hand-edited to add in the functionality described above, but without the boolean flag.)

@mizterp
mizterp commented Jun 10, 2011

Thanks man!
Just what I needed for my FB apps :)

@localpcguy

No problem, glad someone else found it useful.

@localpcguy localpcguy Edit to add classes to the Colorbox div when the .load() function is …
…called based on which type of content was loaded (inlineHTML, inlineContent, iframe, image) - allows ability to customize styling of the colorbox content if the same function is used for multiple colorbox loads throughout the site
12cf5c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.