Problem using js jquery helper
- by Josh R
hi,
I am using cakephp 1.3.6 and am trying to use inbuilt js helper. I have added
var $helpers = array('Js' => array('Jquery'));
in my controller. In my layout, I have included the jquery files and have also included
echo $this->Js->writeBuffer();
before the </body> tag.
I checked if the jquery libraries correctly but trying to create a simple accordian from the jqueryui.com, it works fine.
But when I try
<?php
$this->Js->get('#element');
$this->Js->drag(array(
'container' => '#content',
'start' => 'onStart',
'drag' => 'onDrag',
'stop' => 'onStop',
'snapGrid' => array(10, 10),
'wrapCallbacks' => false
));
?>
<div="element">something</div>
It does not work.
I appreciate any help.
Thanks.