Good question. It turns out that JQuery.UI is already included in edx-platform. It is made available through RequireJS, and there are a number of files that load it as a dependency. You can see its registration here:
https://github.com/edx/edx-platform/blob/master/lms/static/lms/js/require-config.js#L78 Probably your safest bet is to load JQuery.UI using RequireJS because then it will be guaranteed to be loaded even if other files stop using it. Here's an example: https://github.com/edx/edx-platform/blob/ab04f537c7fc3b4e2eb36838c0db56faecf6f08c/cms/static/js/models/course_update.js#L1 I hope this helps. - Andy On Tue, Sep 27, 2016 at 11:10 PM, Дмитрий Утробин <[email protected]> wrote: > Thank you for your answer. > > I don't understand how it works. I added a simple code from jqueryui.com > in lms/js/course_info.js. And it's all right. It works. But I don't > understand where jqueryui is included in open edx? > > вторник, 27 сентября 2016 г., 21:06:55 UTC+7 пользователь Andy Armstrong > написал: >> >> Here's our wiki page for how to add a new JavaScript library: >> >> https://openedx.atlassian.net/wiki/display/FEDX/How+to+add+a >> +new+third+party+JavaScript+library+to+LMS+or+Studio >> >> Note that this updates the platform, so you probably can't do all of this >> within a theme. You'll probably have to fork the code to use this approach. >> >> Let me know if you'd like more details. >> >> - Andy >> >> >> >> >> On Tue, Sep 27, 2016 at 6:28 AM, Дмитрий Утробин <[email protected]> >> wrote: >> >>> For example, in lms/static/js/ I found bootstrap.js and some jquery >>> modules. But I want to use jqueryui. How to include it in open edx? >>> >>> вторник, 27 сентября 2016 г., 16:25:42 UTC+7 пользователь Дмитрий >>> Утробин написал: >>>> >>>> Hello! >>>> >>>> How to add javascript library to open edx theme? >>>> >>>> Thanks >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "General Open edX discussion" group. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/edx-code/02a444f6-3ffe-4271-b650-60e0f99113b1%40googlegroups.com >>> <https://groups.google.com/d/msgid/edx-code/02a444f6-3ffe-4271-b650-60e0f99113b1%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> >> -- >> >> *Andy Armstrong* >> >> edX | UI Architect | [email protected] >> >> 141 Portland Street, 9th floor >> >> Cambridge, MA 02139 >> http://www.edx.org <http://www.edxonline.org/> >> >> [image: >> http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566] >> > -- > You received this message because you are subscribed to the Google Groups > "General Open edX discussion" group. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/edx-code/878e8a8a-a8d6-47b7-8dcc-5410a63f617b%40googlegroups.com > <https://groups.google.com/d/msgid/edx-code/878e8a8a-a8d6-47b7-8dcc-5410a63f617b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *Andy Armstrong* edX | UI Architect | [email protected] 141 Portland Street, 9th floor Cambridge, MA 02139 http://www.edx.org <http://www.edxonline.org/> [image: http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566] -- You received this message because you are subscribed to the Google Groups "General Open edX discussion" group. To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/CAG2ZmnAYZ1tKKhKMdt_4O_9yDgOZ2hkfQOwQkPXNWu6%3Doageiw%40mail.gmail.com.
