<?php echo $javascript->link(array("jquery/jquery","jquery/ui/core","jquery/ui/accordion"),false);
?>
There's no need for a component or anything special in the view.
On Tue, Jul 28, 2009 at 1:19 PM, awh<superhornet64@hotmail.com> wrote:
>
> 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 1.2.3.8166
>
> 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:-
>
> http://www.mail-archive.com/cake-php@googl...m/msg61671.html
>
> I have my jquery stuff set up like:
>
> webroot
> |_ 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 -->
>
> </div>
>
> <script type = "text/javascript">
>
> $(function () {
>
> $("#accordion").accordion({
>
> // options go here
>
> });
>
> });
>
> </script>
>
> 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.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment