You'll have to do a couple of things:
- Load the external site into a div which is probably positioned absolutely off the page. (Note: you'd have to pass the external site through a proxy because $().load is AJAX)
$("#sliderpanel").load("/getpagescript?q=http://www.google.com");
- Animate on click of your identifying button.
$("#slider").click(function () {
$(this).show("slide", { direction: "right" }, 1000);
});
/* see: http://docs.jquery.com/UI/Effects/Slide */
3. Wire up a 'toggle' to close the panel, this can be done by replacing the above code with something like:
$("#slider").click(function () {
if($(this).is(":hidden")) {
$(this).show("slide", { direction: "right" }, 1000);
} else {
$(this).hide("slide", { direction: "left" }, 1000);
}
});
You could use an iframe, but as far as I know, there is no way to perform a callback when the page is fully loaded in the iframe. If you're trying to write a plugin that does this, an replacing the first step with setting an iframe's content would be the way to go.
edit: sorry if any of the code blocks are messed up, SO isn't formatting according to whitespace or using the 'code' button in the editor.