Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-31-2009, 11:39 AM   PM User | #1
lauthiamkok
Regular Coder

 
Join Date: Dec 2008
Posts: 117
Thanks: 14
Thanked 0 Times in 0 Posts
lauthiamkok is an unknown quantity at this point
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
lauthiamkok is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:28 PM.


Advertisement
Log in to turn off these ads.