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> Link to comment https://forums.phpfreaks.com/topic/154539-solved-ajax-php-assistance-please/ 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! Link to comment https://forums.phpfreaks.com/topic/154539-solved-ajax-php-assistance-please/#findComment-812882 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.