tra*_*nte 5 javascript jquery colorbox
我将Colorbox.min.js文件从v1.3.19更新为v1.4.6,并且我的一些颜色框不起作用.我在页面和Chrome的控制台上没有任何错误.
我检查了更改日志,但我没有找到anser.你能帮帮忙吗?
(我使用jQuery 1.7.2)
<a href="#" onclick="emailDialog()">e-mail</a>
Run Code Online (Sandbox Code Playgroud)
function emailDialog(){
$.fn.colorbox({
width:"700px", height:"550px",
iframe:true, href:"/contact",
opacity:0.6
});
}
Run Code Online (Sandbox Code Playgroud)
<a href="http://example.com/1.jpeg" class="colorbox-avatar" title="some title" rel="nofollow" >photo</a>
Run Code Online (Sandbox Code Playgroud)
$(document).ready(function() {
$(".colorbox-avatar").colorbox({
rel:'colorbox-avatar',
scrolling: false,
current: "",
slideshow:true, slideshowAuto:false,
opacity:0.6,
width:"60%" , height:"60%"
});
}
Run Code Online (Sandbox Code Playgroud)
调用它时不带.fn... 所以$.colorbox({...})
($.fn用于开发 jQuery 插件,实际上只是 的简写$.prototype)。
function emailDialog(){
$.colorbox({
width:"700px", height:"550px",
iframe:true, href:"/contact",
opacity:0.6
});
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
490 次 |
| 最近记录: |