CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   jQuery ajax: Load and fadeIn (http://www.codingforums.com/showthread.php?t=167685)

lauthiamkok 05-31-2009 11:39 AM

jQuery ajax: Load and fadeIn
 
Hi,
This is an external html (external.html) I want to load into a page with ajax,

Code:

<div id="wrapper">
  <div id="contents">
    xxx
  </div>
</div>

This is the parent page,

Code:

<div>
    <ul>
        <li><a href="#" onclick="ajax_request(); return false;">1</a></li>
    </ul>
</div>

<div class="bottom" id="studies">
</div>

This is the ajax call which I am using Jquery,

Code:

function ajax_request() {
  $('#studies').html('<p>loading</p>');
  $('#studies').load("external.html");
  $("#contents").fadeIn(700);
}

I can load the external.html successfully, but I am not able to fade in the div with the id of 'contents' because it is inside the external.html

How do I get around to it?

Many thanks,
Lau


All times are GMT +1. The time now is 11:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.