Php 颜色盒平滑淡入内容
我有一个问题:我使用colorbox来生成那些jQuery弹出窗口()。问题是,我希望通过ajax平滑地淡入内容,而不需要加载div,您可以在内容显示之前看到加载div 当我通过不透明度禁用加载div时,它就消失了,但我无法平滑地淡入我的内容。它只是突然出现Php 颜色盒平滑淡入内容,php,javascript,jquery,css,Php,Javascript,Jquery,Css,我有一个问题:我使用colorbox来生成那些jQuery弹出窗口()。问题是,我希望通过ajax平滑地淡入内容,而不需要加载div,您可以在内容显示之前看到加载div 当我通过不透明度禁用加载div时,它就消失了,但我无法平滑地淡入我的内容。它只是突然出现 <script type="text/javascript"> $(document).ready(function(){ $(".register_link").colorbox
<script type="text/javascript">
$(document).ready(function(){
$(".register_link").colorbox({
initialWidth:'886',
initialHeight:'410',
fixed:'true',
scrolling:'false',
transition:'fade',
onOpen: function(){
$("#colorbox").css("opacity", 0);
},
onComplete: function(){
var title = 'Register';
$('#cboxTitle').text(title);
$("#colorbox").css("opacity", 1);
}
});
});
</script>
$(文档).ready(函数(){
$(“.register\u link”).colorbox({
初始宽度:'886',
初始高度:'410',
修正:'true',
滚动:'false',
过渡:'fade',
onOpen:function(){
$(“#colorbox”).css(“不透明度”,0);
},
onComplete:function(){
变量标题='寄存器';
$('cboxTitle')。文本(标题);
$(“#colorbox”).css(“不透明度”,1);
}
});
});
您可以使用jQueryanimate()
函数,而不是.css()
函数
onComplete: function(){
var title = 'Register';
$('#cboxTitle').text(title);
$("#colorbox").animate({"opacity": 1});
}
您可以使用jQuery
animate()
函数,而不是.css()
函数
onComplete: function(){
var title = 'Register';
$('#cboxTitle').text(title);
$("#colorbox").animate({"opacity": 1});
}
很好用!非常感谢你!你救了我一天!:)很好用!非常感谢你!你救了我一天!:)