向 ZendX_JQuery 添加样式表会禁用 jQuery?
我正在尝试向我的 Zend_Form 添加一个日期选择器。这可以正常工作,但前提是我不向 jQuery 对象添加样式表。如果我添加样式表,日期选择器就会停止工作。这是我的引导程序:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initViewHelpers()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->jQuery()->uiEnable();
$view->jQuery()->addStylesheet('/backoffice/css/jquery.css');
}
}
?>
我知道样式表已应用,因为 Firefox 有一些关于缩放和过滤属性的警告。然而,没有 JavaScript 错误,但它刚刚停止工作。 javascript 代码生成正常,并且包含正确的文件。 我完全傻了,有人可以帮忙吗? 提前致谢!
I am trying to add a datepicker to my Zend_Form. This works all right, but only if I don't add a stylesheet to the jQuery object. If I add a stylesheet, the datepicker just stops working. Here is my bootstrap:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initViewHelpers()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$view->jQuery()->uiEnable();
$view->jQuery()->addStylesheet('/backoffice/css/jquery.css');
}
}
?>
I know the stylesheet is applied, because there are some warnings from Firefox about the zoom and the filter property. There are no javascript errors however, but it has just stopped working. The javascript code is generated okay, and the proper files are included.
I'm completely dumb-struck, could someone please help?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用?
你为什么不在你的布局中
Why dont you use
in your layout?
我已经解决了。看来 css 文件已损坏,我使用了旧文件并且它有效。谢谢!
I have already solved it. It seems the css file was corrupted, I used an old file and it worked. Thanks!