Reputation: 323
I'm stupid, sorry. But I really don't get it working! I would love to have the content beeing loaded from an external php file.
e.g. myfeed.php .
the content is wrapped in a class called "myfeed".
$(document).ready(function(){
$.ajaxSetup({cache:false});
$("#bestseller a").click(function(){
var post_id = $(this).attr("rel")
$(".featureline").html("loading...");
$(".featureline").load(jQuery(this).attr("href") + " .myfeed")
return false;
});
});
could anybody please tell me how to modify this code above to get it working? The Ajax loading works - but I don't get the external file loaded.
Many thanks! AD
Upvotes: 0
Views: 520
Reputation: 3627
$(".featureline").load(FileURL);
FileURL
should be path to your file, eg. myfeed.php
.
Upvotes: 0
Reputation: 4092
The + " .myfeed")
looks out of place in this line:
$(".featureline").load(jQuery(this).attr("href") + " .myfeed")
Remove it and your query will work.
$(".featureline").load(jQuery(this).attr("href"));
Upvotes: 1