snipt

Ctrl+h for KB shortcuts

HTML

Move the Django Admin jQuery Back to Its Default Namespace

<script>(function($){jQuery = $.noConflict(true);})(django.jQuery);</script>
https://snipt.net/embed/447d01c5a277bf723e1a3d95f14d529e/
/raw/447d01c5a277bf723e1a3d95f14d529e/
447d01c5a277bf723e1a3d95f14d529e
html
HTML
1
2019-08-22T01:34:46
True
False
False
/api/public/snipt/24957/
move-the-django-admin-jquery-back-to-its-default-namespace
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">script</span><span class="p">&gt;(</span><span class="kd">function</span><span class="p">(</span><span class="nx">$</span><span class="p">){</span><span class="nx">jQuery</span> <span class="o">=</span> <span class="nx">$</span><span class="p">.</span><span class="nx">noConflict</span><span class="p">(</span><span class="kc">true</span><span class="p">);})(</span><span class="nx">django</span><span class="p">.</span><span class="nx">jQuery</span><span class="p">);&lt;/</span><span class="nt">script</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
admin, django, django-admin, jquery, namespace