Answer the question
In order to leave comments, you need to log in
How to use $(window).load(function(){} in emberjs?
Hello! The question for emberjs 2.1 is the following:
There is some code in the js file that does not want to work in any way.
$(window).load(function(){
$(".scrollers").mCustomScrollbar();
$('select').styler();
console.log($('#gender input').val()) // undefined! Хотя по факту 'man'
});
Answer the question
In order to leave comments, you need to log in
You can use the ready
event , but this is a clumsy way.
It is more correct to make components and execute mCustomScrollbar and styler inside them.
$('select').styler();
called on almost every page.
Those. do I need to call the function separately for each page, in the components?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question