I'm trying to learn on making my first dynamic loader from scratch with jQuery (for learning purpose) here is where I got stuck:
<script type="text/javascript">
jQuery.learningdynamicloader= function(){
var js = [];
var css = [];
console.log(js,css);
};
</script>
<script>
$(document).ready(function() {
$.learningdynamicloader(function(){
js = ['jquery','test'];
css = ['css','test'];
});
});
</script>
My firebug log js and css returns nothing, it seems that there is a problem. After I Google is there any diffrence between js = ['values'] and js : ['values'] ?
Thanks for looking.