0

hey ppl i am coding a new website, i am using the JQUERY UI library. it working perfectly but now i came to dynamic updating the pages using prototype.js when i use prototype.js alone it is fine but when i include the ui library everything goes upside down, i mean everything messes up. is there is anyway that i can use prototype.js with ui without everything goes bad?? please dont tell me to not use ui library couz my main site's layout is made with the UI library. And if there is another library like the prototype.js library and dont messes up the ui style please tell me. any help will be greatly apreaciated!

2

2 Answers 2

2

You can override the $ to any custom symbol you want and use it for jQuery manipulation and leave $ for the conflicting library(prototype.js).

Check this out: http://letmehaveblog.blogspot.com/2006/09/using-prototype-and-jquery-together.html

"$" is basically a short for "jQuery", doing jQuery.noConflict() tells jQuery library to not use $ as the short. so $("#id") can be done as jQuery("#id").

Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

1

jQuery-UI is built on top of jQuery. Both jQuery and prototype use $ as the name of their main function. Sounds like jQuery and prototype are fighting over $. You could use jQuery instead of prototype or call jQuery.noConflict() to tell jQuery to let go of $ for other things to use.

1 Comment

than you. but still nothing is changing. after i add the jQuery.noConflict() wt else showld i add for it to be fine?? should i add anything else???

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.