Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
146
rated 0 times [  153] [ 7]  / answers: 1 / hits: 18346  / 13 Years ago, wed, october 12, 2011, 12:00:00
jQuery(#menu li a).click(function(){
var page_url = jQuery(this).attr(href)
jQuery(.wide_main).html(<p>loading...</p>);
jQuery(.wide_main).load( page_url + '#main_content');
});


I have this code but it just loads the entire requested page instead of just the #main_content div.



Thanks.


More From » jquery

 Answers
21

try to add space between url and #main_content



        jQuery(.wide_main).load( page_url + ' #main_content');

[#89646] Tuesday, October 11, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kristiano

Total Points: 652
Total Questions: 94
Total Answers: 108

Location: Suriname
Member since Sun, Jun 13, 2021
3 Years ago
;