Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

load external html file to div using jquery

Tags:

html

jquery

load

I am using a html page which has many tooltips. each tooltip has a gallery, since it is not possible to use multiple gallery which has same id, I am planning to create 6 different html files for gallery, then load the gallery into my default page.

I need to cal the html page for each div. I tried .load but it is not working.

<div id="flrmain">need to call the html file inside this div.<div>

Please help.

like image 761
Sowmya Avatar asked Jan 13 '12 11:01

Sowmya


1 Answers

$.get('test.html')
 .success(function(data) {
     $('div.content').html(data);
 });

EDIT

If you need it for that specific div, replace 'div.content' with '#flrmain'.

like image 146
Skyrim Avatar answered Oct 06 '22 00:10

Skyrim