开发者

Error: $(document).ready is not a function

I understand this question has been asked multiple times on various sites and forums however the context has mostly been jquery. In my case, I am not using jquery at all though I am using CakePHP 1.3 with prototype and scriptoculous. I am trying to make Ajax pagination work using default Js helper however every time I load the page, I get the error below i开发者_如何学Gon error console

Error: $(document).ready is not a function

Any idea what's wrong here.


It seems (after some googeling) that the syntax to use in prototype is document.observe('dom:loaded', fn);

http://www.prototypejs.org/api/document/observe


In prototype, I think you can use

document.observe("dom:loaded", function() {
    // Do initialization here
});

for performing the initialization tasks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜