Jquery移动日期框今天按钮关闭点击 [英] Jquery mobile datebox today button close on click

查看:82
本文介绍了Jquery移动日期框今天按钮关闭点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里使用jquery mobile日期框: http://dev.jtsage.com/ jQM-DateBox / ,我将calTodayButton设置为true。我的问题是,当我单击按钮,它只是选择今天的日期,这是罚款,但我也希望它关闭点击。

I'm using the jquery mobile datebox from here: http://dev.jtsage.com/jQM-DateBox/ and I am setting the calTodayButton to true. The problem I have is when I click the button it just selects today's date which is fine but I also want it to close on click. Any ideas as to the best way to do this?

感谢,
Andrej。

Thanks, Andrej.

推荐答案

尝试向按钮关闭父容器的按钮添加点击事件

Try adding an click event to the button which closes the parent container like this

$('.ui-datebox-controls').find('a.ui-btn').on("click",function(){
    $(this).parent().parent('.ui-datebox-container').hide();
 });

这篇关于Jquery移动日期框今天按钮关闭点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆