开发者

jQuery - .load Not Working

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");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜