可以在cakePHP中使用jQuery插件吗?-CanjQuerypluginsbeusedincakePHP?
Hello I am not able to understand how to use jQuery plug-ins in cakePHP. I have one plug-in by the name "countdown". It has 2 js files, one html, one css file and a few images. If I were using regular Javascript file, I'd have to give a name to my file and call it in the view or in default.ctp using the "$html->script('path/to/file')" function. But now I have other files too, and if I put them in separate folders complying with the cake structure. But then, I would also have to edit the files with changed paths.
您好我无法理解如何在cakePHP中使用jQuery插件。我有一个名为“倒计时”的插件。它有2个js文件,一个html,一个css文件和一些图像。如果我使用普通的Javascript文件,我必须给我的文件命名,并使用“$ html-> script('path / to / file')”函数在视图或default.ctp中调用它。但现在我也有其他文件,如果我把它们放在符合蛋糕结构的单独文件夹中。但是,我还必须编辑更改路径的文件。
Is there an easy way than putting them in separate folders?
有没有比将它们放在单独的文件夹中更简单的方法?
1 个解决方案
#1
2
I would simply put them all in your (assumed) app/webroot/js/jquery/plugins/
.
我只是将它们全部放在你的(假设的)app / webroot / js / jquery / plugins /
I see the whole package as something that belongs to js folder, not the individual files.
我认为整个包是属于js文件夹的东西,而不是单个文件。
PHP之友评论