Hi fellows, how are you? I'm stuck here with this. Perhaps you will
suggest me to learn some more abstracted JS framework but by now I'm
trying to learn the deeps of raw JS.
I have 2 files, one is app/javascript/file_1.js and the other is
app/javascript/namespace/file_2.js . Both of them do:
window.onload = function() {
// something
}
Both gets required by the application.js manifest, I've tested it
putting an alert('Eyaa') on both files, alert gets executed twice, so
working, good.
Here comes the issue: just one window.onload get listened, the other
not. The one listened is the first required(first file required). I
wonder why does this happen? One file is for one view, and the other
file is for another view, I want to have the code splitted, for order.
Don't have a clue. Can you help me?
--
Posted via
http://www.ruby-forum.com/.