mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
select2 is not a function error fix
This commit is contained in:
parent
fdb1b970f0
commit
0fb0727091
@ -1,4 +1,5 @@
|
|||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
if ($("select[name='parent_category']").length ) {
|
||||||
$("select[name='parent_category']").select2({
|
$("select[name='parent_category']").select2({
|
||||||
ajax: {
|
ajax: {
|
||||||
url: window.location.origin + "/keySearch",
|
url: window.location.origin + "/keySearch",
|
||||||
@ -30,4 +31,6 @@ $( document ).ready(function() {
|
|||||||
var data = e.params.data;
|
var data = e.params.data;
|
||||||
$("input[name='category_name']").val(data.text);
|
$("input[name='category_name']").val(data.text);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Loading…
Reference in New Issue
Block a user