The error "Uncaught TypeError: $(...).tabs is not a function" is produced when using django-tabbed-admin under the following setup:
Django = 1.10.5
django-tabbed-admin=1.0.4
DEFAULT_JQUERY_UI_JS = 'tabbed_admin/js/jquery-ui-1.11.4.min.js'
The problem is that the code in jquery-ui-1.11.4.min.js is as follows:
and the code on django-tabbed-admin uses it this way (change_form.html):
<script type="text/javascript">
(function($) {
$(window).scrollTop()
$('#tabs').tabs({
{% if add %}
// when adding, don't select a tab by default, we'll do it ourselves
// by finding the first available tab.
selected: -1
{% endif %}
});
(....)
})(django.jQuery);
</script>
<!-- end admin_tabs stuff -->
To sort this out this should be what would be passed in to the IIFE instead of the (django.jQuery) as above:
Coverage remained the same at 89.971% when pulling 430c05dccd85a976e47639a20e5a9693d27c80a6 on Rui-Carvalho:Fixing-issue-35 into 82cf9854ef367f488f84885302b2ccef693c48bd on omji:master.
See issue 35:
The error "Uncaught TypeError: $(...).tabs is not a function" is produced when using django-tabbed-admin under the following setup:
Django = 1.10.5 django-tabbed-admin=1.0.4 DEFAULT_JQUERY_UI_JS = 'tabbed_admin/js/jquery-ui-1.11.4.min.js' The problem is that the code in jquery-ui-1.11.4.min.js is as follows:
and the code on django-tabbed-admin uses it this way (change_form.html):
To sort this out this should be what would be passed in to the IIFE instead of the (django.jQuery) as above: