Loading content into div with Ajax … How do I target the same div with the new page loaded?
问题 I'm loading a php page into a div using the following: <li><a href="content1.php" data-target="#right_section">Some Content</a></li> $('[data-target]').click( function (e) { var target = $($(this).attr('data-target')); target.load($(this).attr('href')); e.preventDefault(); // prevent anchor from changing window.location }); <div id="right_section"></div> This works perfectly fine.... however: I want to load another page into that same div, but the link is in content1.php . I basically want it