cakephp Js 助手
我想做这样的事情。
如果我点击某个 DIV (id='#some-link')
,它应该会显示另一个 DIV (id='#busy-indicator')
。
我已经写了以下内容,但它不起作用。
$this->Js->get('#some-link')->event('click', $this->Js->get('#busy-indicator')->effect('fadeIn'));
应该进行哪些修正才能使其正常工作?
它生成以下输出。
$(document).ready(function () {
$("#busy-indicator").bind("click", function (event) {
$("#busy-indicator").fadeIn();
return false;
});
});
I want to do something like this.
If I click on some DIV (id='#some-link')
, it should show me the another DIV (id='#busy-indicator')
.
I have written following, but it's not working.
$this->Js->get('#some-link')->event('click', $this->Js->get('#busy-indicator')->effect('fadeIn'));
What should be the correction to get it working?
It generates following output.
$(document).ready(function () {
$("#busy-indicator").bind("click", function (event) {
$("#busy-indicator").fadeIn();
return false;
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用如下所示的“两步”解决方案:
这是 HTML 输出:
You can use a "two-step" solution like this:
This is the HTML output: