WalterJ89
WalterJ89

Reputation: 1045

ajax partial load from another page

So what I want to do is load only a section of one webpage onto another page. So I want to grab the content of a page (stuff inbetween a div with a certain id) without the headers and footers. I know I've seen this before but its, stangly, a hard thing to find.

Anyone kind enough to point me in the right direction?

thank you

Upvotes: 0

Views: 1024

Answers (1)

Sarfraz
Sarfraz

Reputation: 382696

You can use the jquery's load method for that.

$('#result').load('test.html #container');

This will load contents of element having id container from test.html page into current page and inside the element with id result.

Upvotes: 3

Related Questions