Mar*_*tin 5 html javascript iframe jquery twitter-bootstrap
我需要使用Twitter Bootstrap 3.0制作一个poppos show iframe,它popopver应该根据使用href的onmouseover事件在链接中提供的值显示iframe.
我得到第一个链接工作,但不是在3.0,但在2.0.2,但第二个链接应该改变变量的值,并显示一个不同的iframe,我似乎不知道如何做到这一点.
$(window).load(function(){
var img = '<iframe frameborder="0" scrolling="no" height="220" width="420"
src="http://dxlite.g7vjr.org/?dx=LU5DX&limit=10"></iframe>';
$("#blob").popover({title: 'Last 10 spots for the selected station', content: img});
})
<a href="#" id="blob" class="btn large primary" rel="popover" style="margin-top:
100px">hover for popover</a>
<a href="#" id="blob" class="btn large primary" rel="popover" onmouseover=""var img =
'<iframe frameborder="0" scrolling="no" height="220" width="420"
src="http://google.com"></iframe>';"" style="margin-top: 100px">hover for popover</a>
Run Code Online (Sandbox Code Playgroud)
你相信我太复杂了.
data-trigger = "hover"或设置.出于性能原因,Tooltip和Popover data-apis是可选的.如果您想使用它们,只需指定一个选择器选项.
HTML:
<a href="#" id="blob" class="btn large primary" rel="popover" style="margin-top:
100px">hover for popover</a>
<a href="#" id="blob2" class="btn large primary" data-trigger="hover" rel="popover" data-html="true" data-content='<iframe frameborder="0" scrolling="no" height="220" width="420"
src="http://dxlite.g7vjr.org/?dx=LU5DX&limit=10"></iframe>' style="margin-top: 100px">hover for popover</a>
Run Code Online (Sandbox Code Playgroud)
JS:
$(window).load(function(){
var img = '<iframe frameborder="0" scrolling="no" height="220" width="420" src="http://dxlite.g7vjr.org/?dx=LU5DX&limit=10"></iframe>';
$("#blob").popover({title: 'Last 10 spots for the selected station', content: img, html:true});
$('[rel="popover"]').popover();
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3685 次 |
| 最近记录: |