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">
<!-- Put your accordion stuff here -->
</div>
<script type = "text/javascript">
$(function () {
$("#accordion").accordion({
// options go here
});
});
</script>
On Feb 27, 2:40 pm, BrendonKoz <[email protected]> wrote:
> Is it possible to be even a bit more specific? Is jQuery being
> successfully loaded in to your CakePHP page? Is the jQuery UI script
> successfully loaded? Are you having problems loading the two scripts
> in to your layout, or afterward? You can check the source of your
> rendered page to see if the path to your scripts are being loaded
> properly. Do you have a web-accessible version of this page to see
> what may be the problem?
>
> jQuery is meant to be unobtrusive, meaning you don't have to do
> anything special with CakePHP to get it to work (once all the scripts
> are included). So, it's hard to say what the problem is. You do not
> need scriptaculous or prototype to work with jQuery. Think of
> scriptaculous as the effects (UI) library for the Prototype JS
> library.
>
> On Feb 27, 2:27 pm, Stu <[email protected]> wrote:
>
>
>
> > To be a bit more specific, I want to implement this
> > guy:http://docs.jquery.com/UI/Accordion
>
> > I tried it out in a simple html and it worked fine, but Cake on the
> > other hand does a good job at refuting my JQuery codes.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---