1

I'm wondering if this is somehow possible, though it is not allowed to manipulate content from another domain via Javascript through an iframe.

I'm wanting to use Colorbox to load a specific element from another page. So, if on the other website, there is a container div#shell, I want the Colorbox to show me only the content within div#shell.

This content is on another domain, so, I'm not sure if this is possible. I think I'll be limited to screenshots...

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
Chris Ullyott
  • 303
  • 1
  • 12

2 Answers2

0

Instead of an iframe, you could use jQuery ajax to pull the page into a variable and find the appropriate section by parsing the HTML.

kitti
  • 14,663
  • 31
  • 49
  • 1
    Agreed, and remember that the jQuery AJAX calls support pulling only part of the content of the target, as in `$('#result').load('ajax/test.html #container');` which would acquire only the element with ID of container. – CSSian Feb 03 '12 at 18:27