jamesxg1 Posted January 20, 2010 Share Posted January 20, 2010 Hiya peeps, I have a JQuery script that loads a external page and displays it I was wondering how I would use the divs and classes in the external content EG. Index Load external External <div id="BLAH"></div> use #BLAH in Index Many thanks James. Quote Link to comment Share on other sites More sharing options...
trq Posted January 20, 2010 Share Posted January 20, 2010 I'm not sure what you mean exactly. Once the external page is in the dom jQuery should have access to it. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted January 20, 2010 Author Share Posted January 20, 2010 I know I thought the same. But it appears not here's what I have done and the snippets. In 'index' I have a div that loads all the thread contents from 'responder.php' using a switch function then I have made it so that each thread is a link, I need the link to load another switch function upon onclick. Also I was wondering how I would fetch the specific content eg how do I make it so that I can also send the the a hrefs class value as a param to the load function. Index $('a#viewthread').click(function() { $('div#post_new').slideUp('slow').empty().hide(); $('div#threads').slideUp('slow').empty().hide(); $('div#start').slideUp('slow').empty().hide(); $('div#question').load('responder.php?mode=readquestion').show().fadeIn('slow'); }); This is what the treads snippet is to make them a link but the link isnt working. echo '<a href="#" title="View this question" accesskey="V" id="viewthread"><table class="tablebg" width="100%" cellspacing="1">'; echo '<tr>'; echo '<th>' . $this->unsolved['title'] . '</th>'; echo '</tr>'; echo '<tr>'; echo '<td class="row1" align="center"><br /><p class="gen">' . $this->unsolved['body'] . '</p><br /></td>'; echo '</tr>'; echo '</table></a>'; Sorry about it having all them echo's lol. Many thanks James. Quote Link to comment Share on other sites More sharing options...
trq Posted January 20, 2010 Share Posted January 20, 2010 Nope. Your question still isn't making much sense. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.