不过苹果自家的应用总是挑战HIG,早在iBooks的iPhone版已经在使用Popover[1],最近的iWork也用上了。
我个人认为如果界面中有些选项,而且选项比较少、用Action Sheet又不方便实现的情况下,可能定制一个Popover是比较好的选择。
这样:
<script>
jQuery(document).ready(function($) {
$('.theme-login').click(function(){
$('.theme-popover-mask').fadeIn(100)
$('.theme-popover').slideDown(200)
setTimeout(function() {
console.log('22222222222')
$('.theme-popover-mask').fadeOut(100)
$('.theme-popover').slideUp(200)
}, 1000)
})
$('.theme-poptit .close').click(function(){
$('.theme-popover-mask').fadeOut(100)
$('.theme-popover').slideUp(200)
})
})
</script>
扩展资料:利用setTimeout(),setTimeout()方法用于在指定的毫秒数后调用函数或计算表达式。
语法:
setTimeout(code,millisec)
提示和注释:
setTimeout() 只执行 code 一次。如果要多次调用,请使用 setInterval() 或者让 code 自身再次调用 setTimeout()。