In Loki We Trust The many projects of Lokkju, Inc

24Sep/102

Making jQuery-UI work in the Django Admin

Problem: Django's Admin moves the jQuery namespace into a custom one, django.jQuery, to prevent conflicts. But what if you want to use the provided jQuery, with jQuery-UI? jQuery-UI, and many other jQuery plugins, expect there to be a "jQuery" namespace.

Quick Fix - lets move it back to the jQuery namespace:


<script>(function($){jQuery = $.noConflict(true);})(django.jQuery);</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>

And that's it!

feedback
Filed under: Uncategorized 2 Comments
12Sep/090

I’m back…

Well, I finally got around to restoring the blog after all this downtime. Hopefully I can start putting up more code here soon - I have a large backlog of small projects to post about.

feed
Filed under: Uncategorized No Comments
e-mail
trademarks