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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

[solved] jQuery(document).ready(function() not working in admin

Go to End

4 Posts   32072 Views


Community Member, 271 Posts

18 July 2009 at 9:55am

Edited: 20/07/2009 12:06am

I try to get jquery to work in the admin of the cms, but it does not recognize page elements like input.text or #Form_EditForm_Title.

I forced an alert with

Wich popups before the SS loadingscreen is gone.

But what i think is dat the RightAdminside is loaded after the complete page is loaded?

Is there a way to load all the pageelements before the complete page is rendered?


Forum Moderator, 5523 Posts

19 July 2009 at 1:05am

Make sure when you write your file you wrap your jquery in a function($) to stop conflicts. $(document).ready() should mean that the form fields exist so you shouldn't have any issues. For an example of using jquery in the cms look at the model admin JS code. This was the first part of SS written in jquery so provides the main reference.


Community Member, 271 Posts

20 July 2009 at 12:02am

Edited: 20/07/2009 12:03am

Thanks its working now!

I didnt got the extra wrapper arround my code:

(function($) {




Community Member, 99 Posts

17 February 2011 at 4:28am

I have some jQuery in the CMS Admin which matches field content to the Title field

I have my jQuery working,

Problem is, if I click on a page in the Left Hand side bar of the Admin to edit a different page, which obviously reloads the form as normal
yet now my Jquery doesn't work on this form.

If I refresh/reload the whole page it works again (its a pain having to refresh the whole page everytime

anybody come across this kinda thing?

Attached Files