开发者

opening link in same window using jquery

.bind('click',function(){ window.open($(this).find('.pc_more').html()); }); });

is there something in this part of the code that tells it to open the link in a new page? can 开发者_如何转开发i put some code to open the link in the same window?


You're looking for:

.bind('click', function(){
    window.location = $(this).find('.pc_more').html();
});

...assuming that the element matched by .pc_more really has a link as its HTML.

Live example


Try using window.location instead of window.open().

window.location = $(this).find('.pc_more').html();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜