Is it possible to have colorbox and its animations in an expanding div rather than a new modal window? Not sure colorbox is the correct way to do this.
I want to ajax load external html into a div but keep the close, animation and loading functions colorbox has.
Any thoughts would be much appreciated.
Certainly! colorbox simply looks at the
hrefattrbibute of the<a>tag that you’re applying colorbox to. It doesn’t matter whether that tag links to an image or an html file, it will load the content into a fancy colorbox frame.For example, in your main page content:
And in your javascript:
Clicking the link should load the contents of
yourPage.htmlinto an expanding div.EDIT: Oh, I didn’t understand your question. I guess if you don’t want the overlay and the centered frame, you could change it with some css. Add this to the CSS of your main page:
EDIT EDIT: This probably won’t work because the script will override these css declaration. I don’t know what the solution is.