0
have the following error accusing in browser developer mode
Uncaught TypeError: undefined is not a function general.js:1549
init general.js:1549
(anonymous function) login:542
c jquery.js:4
p.fireWith jquery.js:4
x.extend.ready jquery.js:4
q
I found nothing to help me and my application behaves strangely.
Updating
code in haml of the page
%a{:href => "http://www.site.com.br"} © 2014 empresa
%script{:src => "js/jquery.js"}
%script{:src => "js/behaviour/general.js", :type => "text/javascript"}
function in file . js which error points:
if(config.select2){
$(".select2").select2({
width: '100%'
});
}
André without seeing your code we can not help more than translate this error message to PT...
– Sergio
ah yes, sorry. just a minute
– André Ventura
André, Select2 needs a file. js like this: http://ivaynberg.github.io/select2/select2-3.5.2/select2.js. I don’t see it in your list to be loaded after jQuery...
– Sergio
everything was in the wrong directory, with wrong calls, I’m trying to implement an admin template and my application, but I haven’t figured out how to do it.
– André Ventura