Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 如何在cakephp中调用slider_Jquery_Cakephp - Fatal编程技术网

Jquery 如何在cakephp中调用slider

Jquery 如何在cakephp中调用slider,jquery,cakephp,Jquery,Cakephp,我需要在cakephp中为包含图像的div添加滑块。我已经在jqueryEngine helper中尝试了示例代码 Controller.php App::uses('JqueryEngineHelper', 'Helper'); public $components = array('RequestHandler'); var $helpers = array('Js'); $this->Js->slider(array( 'complete' => 'onCom

我需要在cakephp中为包含图像的div添加滑块。我已经在jqueryEngine helper中尝试了示例代码

Controller.php

App::uses('JqueryEngineHelper', 'Helper'); 
public $components = array('RequestHandler');
var $helpers = array('Js');

$this->Js->slider(array(
   'complete' => 'onComplete',
   'change' => 'onChange',
   'min' => 0,
   'max' => 10,
   'value' => 2,
   'direction' => 'vertical',
   'wrapCallbacks' => false
));
但这不起作用。我得到的错误如下

对非对象调用成员函数slider()


请告诉我哪里错了

你有没有在谷歌上搜索错误信息?很明显这里出了什么问题。这个错误以前在这里被问过1000次

对非对象调用成员函数slider()

看起来JsHelper没有加载,因此您得到了一个“非对象”。加载JsHelper。如果这没有帮助,你需要找出原因