Lütfen bir göz atın
<div class="item">
<div class="section">
<a href="/test.php?id=1" class="clickme">Click Item 1 </a>
</div>
</div>
<div class="item">
<div class="section">
<a href="/test.php?id=2" class="clickme">Click Item 2 </a>
</div>
</div>
<div class="item">
<div class="section">
<a href="/test.php?id=3" class="clickme">Click Item 3 </a>
</div>
</div>
$('.clickme).click(function(event) {
event.preventDefault();
var stringURL = $(this).attr("href");
$.ajax({
type: "get"
, url: stringURL
, data: "ajax=1"
, success: function(html){ //so, if data is retrieved
//append
}
});
}); //close click(
If it were a single section area I could target it using its id
and append content.
But any ideas how do I know which section to populate with latest content depending upon the click and if the external content is already there (i.e. call made already) just update that section only.
It would be nice if you help how to show/hide a loading image to that section only.
Teşekkürler