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.

General Questions /

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

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

jQuery and Prototype


Reply


3 Posts   1638 Views

Avatar
NtM

Community Member, 39 Posts

13 November 2009 at 9:13am

I used jQuery to create script for the drop down menus. But pages with forms use Prototype.js. So my jQuery script doesn't work.
Is there a way to make these two libraries work together?

thanks!

Avatar
NtM

Community Member, 39 Posts

13 November 2009 at 9:22am

Sorry guys, I found this : http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Overriding_the_.24-function

Avatar
banal

Community Member, 901 Posts

13 November 2009 at 7:49pm

Just wrap your jQuery code as described here (Section: "Wrap everything in a document.ready"):
http://doc.silverstripe.org/doku.php?id=jquery

Using that wrapper also resolves conflicts with other libs and you can still use the $-Sign for your jQuery code.