我正在使用instafeed.js在我的网站上展示最新的instagram图片。但是默认情况下,图像链接会在同一窗口中打开。以下是JS代码:https://github.com/stevenschobert/instafeed.js/blob/master/instafeed.js 更多信息:http://instafeedjs.com
我尝试使用以下方法在新窗口中打开链接:
但是这个技巧在这种情况下不起作用。 有什么解决方法吗?谢谢。
<script>
$(function(){
$("#instafeed a").attr("target","_blank");
});
</script>
但是这个技巧在这种情况下不起作用。 有什么解决方法吗?谢谢。
template:'<a href="{{link}}" target="_blank"><img src="{{image}}" /></a>'
- Jopanchor.target = '_blank';
,现在链接在新窗口中打开了。 - Kasra