8

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.

2
  • 2
    What means 'not working'? Nothing happens? You get errors? Not all content gets loaded? etc. Please post the code you tried. Commented Jan 13, 2012 at 11:15
  • No it's not working!! I have added only div portion in external html (without doctype/body/html tags).. tried with below code but not getting html page inside my div. $.get('timeless_op1.html') .success(function(data) { $('#flrmain').html(data); }); Commented Jan 16, 2012 at 6:35

1 Answer 1

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

EDIT

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

Sign up to request clarification or add additional context in comments.

2 Comments

Replace test.html with your url (you can also specify query parameters, just check out the documentation at jquery).
.success is deprecated, use .done instead. api.jquery.com/jquery.get

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.