deth4uall Posted April 17, 2009 Share Posted April 17, 2009 Ok I am using the jQuery platform to pull up pages into a div called "#main_content" via an HREF link on the side bar. works well BUT the links inside the pulled up page do not inherit the same attributes that the others do. Any ideas? <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function(){ $j('#main_content').load('cityhall.php'); $j('#loading').hide(); $j('a').click(function() { $j("#main_content").slideUp(); var replacement = $j(this).attr("title"); //The actual page being pulled var content_show = $j(this).attr("id"); //using id to send data like "?id=1" if (content_show !== "") { var giveme = "POST"; //If there was an attribute to put into data: } else { var giveme = "GET"; } $j.ajax({ type: giveme, url: replacement, data: content_show, async: true, beforeSend: function(){$j("#loading").show("fast");}, complete: function(){$j("#loading").hide("fast");}, success: function(html){ //so, if data is retrieved, store it in html $j("#main_content").slideDown("slow"); //animation $j("#main_content").html(html); //show the html inside #main_content div } }); }); }); </script> Quote Link to comment Share on other sites More sharing options...
deth4uall Posted April 18, 2009 Author Share Posted April 18, 2009 Added the LiveQuery plugin and it works wonderfully! 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.