点击下弹出RSS提要- Javascript

Pop Under on Click for RSS Feed - Javascript

本文关键字:提要 Javascript RSS      更新时间:2023-09-26

我想设置这个网站,这样当用户点击RSS提要链接(我在网站的一部分中显示)时,提要链接就会出现在下面的弹出框中。这在网站上是有意义的。这是我的用户想要的。

我不知道的是如何填充我正在拉的rss链接,让它们在下面的弹出框中打开。

I've got this:

$(document).ready(function(){
 $("a[href^='http']").attr('target','_blank');
}); 

在一个新窗口中打开链接。我可以像这样添加另一行:

     $("a[href^='http']").attr('onClick','openpopup()');

但我不确定如何制作一些javascript,将1)从锚抓取href;2)用javascript(void)替换它;3)像这样使用url:

function openpopup() {
window.open("url","","toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=no,width=1250,height=500,left=250,top=175").blur(); window.focus();}

任何想法?

不是一个jQuery的家伙,但这应该可以工作

$("a[href^='http']").click(function(event) {
    event.preventDefault(); // prevent the link from opening directly
    // open a pop for the link's url 
    var popup = window.open( this.href , "", "toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,status=no,width=1250,height=500,left=250,top=175" ); 
    popup.blur();
    window.focus();
});