jQuery datepicker动画选项不起作用 [英] jquery datepicker animation options wont work
本文介绍了jQuery datepicker动画选项不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文本框,其中已注册JQuery UI DatePicker控件.效果很好,但是当我尝试添加动画选项时,控件本身将无法正常工作.
I have a textbox which has JQuery UI DatePicker control registered to it. It works fine but when I try to add animation options, control itself wont work.
<head runat="server">
<script>
$(document).ready(function() {
$("#TextBox1").datepicker("option", "showAnim", 'slideDown');
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
</body>
没有选项,选择器将至少显示自己.有人可以告诉我一个解决方案,更好的是,这是怎么回事? 谢谢!
Without the options, the picker would at least show itself. Can someone tell me a solution and better, what's happening? Thanks!
推荐答案
在初始化后定义选项:
// initialization (~= constructor)
$("#TextBox1").datepicker();
// set options
$("#TextBox1").datepicker("option", "showAnim", 'slideDown');
或同时:
// initialization + options (~= constructor with args)
$("#TextBox1").datepicker({showAnim: 'slideDown'});
要调整大小,请在<link>
之后将这种样式添加到html文件中,添加到jquery.ui.all.css中(或在您的自定义.css中):
to resize it add this style to your html file after the <link>
to jquery.ui.all.css (or in your custom .css):
<style type="text/css">
div.ui-datepicker{
font-size:...px;
}
</style>
这篇关于jQuery datepicker动画选项不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文