I already read some existing posts here and searched on google and still nothing.
- $(document).ready(function() {
nav = function() {
return {
on: function(id) {
$(id).addClass('test');
}
}
}
});
How can i call the function
on outside the document.ready.
I also did try window.nav and $.nav and the effect is the same.
It will only work if its in document.ready.