I have to add an external page into a div, if i write this it works
$(document).ready(function(){
$('div[align=center]:eq(1)').append('<br /><a class="linkone" href="#">Link 1</a><div class="testing"></div>');
$(".linkone").click(function(event) {
event.preventDefault();
var thelink = $('.blockhead a').filter('a[href^="http://site.com/gallery/photo/showgallery.php?cat="]').attr('href');
$(".testing").load("http://site.com/gallery/photo/showgallery.php?cat=1001 .forumrow table");
});
});
But if i write this it wont work
$(document).ready(function(){
$('div[align=center]:eq(1)').append('<br /><a class="linkone" href="#">Link 1</a><div class="testing"></div>');
$(".linkone").click(function(event) {
event.preventDefault();
var thelink = $('.blockhead a').filter('a[href^="http://site.com/gallery/photo/showgallery.php?cat="]').attr('hre开发者_JAVA百科f');
$(".testing").load("thelink .forumrow table");
});
});
How can I insert a variable after .load?
$(".testing").load(thelink+" .forumrow table");
精彩评论