Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show div from another website

Is there a way to use an iframe or some other method of showing a named div from another website?

I want to pull in some data from a government website into a google map and when they click the point I want the information from one of the divs on that page to display.

like image 469
Joshua Slocum Avatar asked Nov 30 '22 10:11

Joshua Slocum


1 Answers

Using JQuery, you should be able to exactly that with the load-function.

Here is a small example to get a container with id "container" on a page called Test.html:

$('#contentDiv').load('/Test.html #container');

You can visit the JQuery documentation here for more info.

like image 86
Falle1234 Avatar answered Jan 30 '23 08:01

Falle1234