Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Jquery Blues


Go to End


6 Posts   2325 Views

Avatar
Boundbystars

Community Member, 4 Posts

25 February 2009 at 4:08am

I am trying to get some awesome jquery stuff to take place on my web. But I cannot for the life of me figure out how to get jquery to play nice with SS... Has anyone done this successfully? Tips, tricks, or general sympathy will be muchly appreciated.

Thanks,

Avatar
Carbon Crayon

Community Member, 598 Posts

25 February 2009 at 4:38am

Hi bound

I managed to get Jquery working without much trouble, how are you trying to do it?

Avatar
Boundbystars

Community Member, 4 Posts

25 February 2009 at 8:25am

I put it into the JSparty folder and I can't get it to call in my page.ss header. After I get that to work I just imagine that I'd call the elements from within the page structure.

Is that correct?

thanx a million!!!

Avatar
Carbon Crayon

Community Member, 598 Posts

25 February 2009 at 10:01am

Try this:

Put your jquery.js file into mysite/javascript and add this to your Page.php controller:

Requirements::javascript("mysite/javascript/jquery.js");

That should do it :)

Avatar
Mo

Community Member, 541 Posts

18 March 2009 at 5:29am

I am trying to get some jquery stuff going to. I can get SS to reference it from my themes/js folder. But I knoticed that jquery and a load of plugins are included in the jsparty folder. Is there a more direct way of calling these in. Say for example: Requirements::javascript('jquery');?

I know its not really saving much time over writing the full path, but I like automation wherever possible :).

Thanks,

Mo

Avatar
Carbon Crayon

Community Member, 598 Posts

18 March 2009 at 5:47am

yea I realised it was in there the other day too. I'm not sure there is a one word call you can do, but it's probably a good idea to call it from jsparty anyway, using the full path.