我不知道该把JQuery EasyUI放哪里?
我用它当帮手吗?
我不得不说一些东西,比如:
var $helpers = array( jQuery );
需要我给大家看一眼吗?
非常感谢你们的帮助。
编辑 :
如果你能给我一些在线辅导 与 jQuery EasyUI 和 CakePHPP 2.x. (我已经在谷歌上搜索了。) :D:
我不知道该把JQuery EasyUI放哪里?
我用它当帮手吗?
我不得不说一些东西,比如:
var $helpers = array( jQuery );
需要我给大家看一眼吗?
非常感谢你们的帮助。
编辑 :
如果你能给我一些在线辅导 与 jQuery EasyUI 和 CakePHPP 2.x. (我已经在谷歌上搜索了。) :D:
在CakePHPP中,缩略语文件储存在APP/webroot/js/中。
然后,您可以通过拨号将其包含在布局中
echo $html->script( jquery-1.7.2.min.js );
您可以在视图或其它外部 js 文件中写入您的 Javascript 代码 。
由于这个问题是CakePHP2.x的问题,正确的答案是:
echo $this->Html->script( jquery-1.7.2.min );
请注意 JavaScript 文件没有扩展名 。 < a href="http://book.cakephp.org/2.0/ en/core-librarys/helpers/html.html#HtmlHelper%3a%3a3ascript" rel= 的
echo $this->Html->script(array(
jquery/jquery-1.7.2.min ,
jquery/jquery-ui-1.8.19.custom.min ,
jquery/jquery.tooltip.min ,
raphael ,
main ,
screen
));
脚本依赖性和优先性在这里也有作用。 这意味着, 如果说 < strong > statimA.js 取决于 < strong > statimB.js , 则后一种必须先装入 :
echo $this->Html->script(array(
scriptB ,
scriptA
));
当您重新装入 jQuery 插件时, 您也必须看好这个插件 。 请注意, 在为装入多个脚本文件而提供的示例中, 我给出了这个选项 。
将 jQuery & amp; jQuery Easy EasyUI 源代码上传到您的 /app/webroot/js 目录
将您布局中的链接(如果您希望将链接包含在您所有页面中)或个人观点中的链接:
<?php $this->Html->script(array( jquery.js , jquery-easyui.js ), array( inline =>false)); ?>
(用实际文件名取代jquery.js和jquery-siatui.js文件名)
其中一个有正确装入的库( 使用 Firebug 检查 ;-), 您应该能够使用内嵌脚本( 不推荐) 或装入外部脚本 :
<?php $this->Html->script(array( jquery.js , jquery-easyui.js , myscript.js ), array( inline =>false)); ?>
注意: 您包含这些命令的顺序很重要 。
echo $html->script( jquery-1.7.2.min );
In CakePHP, it seems like a lot of functions can take their arguments as nested, multidimensional arrays, or as dotted strings: $this->MyModel->contain(array( Something , Something.Else , ...
I ve got a cakephp app that I m trying to get to serve up the Pages::404 function (and corresponding view) whenever Cake encounters any error (missing controller, action, etc). What s the best way to ...
I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, ...
I am wondering if there is a way to specify the date format in the forms created using CakePHP s $form->inputs(); Please note that this is not the individual $form->input() but instead $form->inputs() ...
I am writing a CakePHP 1.2 app. I have a list of people that I want the user to be able to filter on different fields. For each filterable field, I have a drop down list. Choose the filter ...
In my CakePHP app, I m pulling in the results of a table called Timesheets . This table has an athlete_id and a few split times for a race. I need to do some calculations on one athlete s times ...
How would I represent the following in a CakePHP model? Product ======= product_id .... Cart ==== cart_id .... Carts_Products ============== cart_id product_id quantity
I am a beginning Cake user and trying to do some work on an already existing application. Running into a problem when I create a new controller. I have created StoreController and when I try to call ...