Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

PHP Implement jQuery UI into CakePHP application, How?

post Jul 19 2009, 08:30 AM, updated 14y ago

Look at all my stars!!
Senior Member
2,156 posts

Joined: Apr 2005
I'm working on something during my free time and at the same time trying to learn. I read around and know that it is possible to implement jQuery UI into a CakePHP application and that it was supposed to be easy.

Been mingling around for a while and still have no idea. Would appreciate if anyone could guide me on how to implement this. I'm using:-

- jQuery UI 1.7.2 or I could move to jQuery UI 1.6 if needed.
- CakePHP

Now, when i downloaded the zipped jQuery UI file, it includes

- css dir (have ui - darkness dir here and an img folder inside it along with a jquery.css file)
- development dir (a shit load of directories and files in here)
- js dir (the jquery.js file seems to be in here)
- index.html

i followed the instructions here:-


I have my jquery stuff set up like:

|_ js
    |_ jquery
         |_ jquery.js
         |_ ui
             |_ core.js
             |_ accordion.js

Then in my view I do:

<?php echo $javascript->link(array("jquery/jquery.js","jquery/ui/
core.js","jquery/ui/accordion.js"),false); ?>

<div id = "accordion">

[bad html removed] Put your accordion stuff here -->


<script type = "text/javascript">

$(function () {


// options go here




but it didnt seem to work out for me.

First thing is, where do i put all the files and folders in my cake dir?

Second thing is, besides the view, do i need to load any components, helpers or the likes into my controller to be able to use this UI? would appreciate if someone could include the code for the view and contoller as im very much clueless.

my cakephp app is just a fresh install with the "blog tutorial" setup on it only. trying to get this setup before moving onto other stuff. hope someone can help me out with this coz i cant design and code even if my life depended on it.

This post has been edited by awh85: Jul 19 2009, 08:31 AM
post Jul 19 2009, 11:33 AM

Junior Member
331 posts

Joined: Jun 2007
From: Isketambola

is the js loaded? use firefox, install web developer add on https://addons.mozilla.org/en-US/firefox/addon/60
or firebug, see if the js loaded


Change to:
| Lo-Fi Version
0.0144sec    0.25    5 queries    GZIP Disabled
Time is now: 10th December 2022 - 12:34 AM