$.nette is undefine ?- why and how to fix that

3 years ago

Zuko
Member | 2
+
0
-

Hi , i ve got problem when using nette.ajax.js , the brower can get $.nette defined , why that ?

the console error:
`TypeError: $.nette is undefined

$.nette.init();`
and my script code in <head> (jquery ver 1.7.2 from google cdn)

<script src="{$basePath}js/jquery.js"></script>
<script src="{$basePath}js/nette.ajax.js"></script>
<script src="{$basePath}js/nette.forms.js"></script>
<script type="text/javascript">
    $(function () {
        $.nette.init();
    });
</script>

3 years ago

Martk
Member | 412
+
+3
-

Have you another error in console?

By the way, this usage of $basePath is wrong, correct is:

<script src="{$basePath}/js/jquery.js"></script>
<script src="{$basePath}/js/nette.ajax.js"></script>
<script src="{$basePath}/js/nette.forms.js"></script>

Last edited by Antik (2016-02-03 20:50)