Create route.js

This commit is contained in:
Namhyeon Go 2018-06-22 11:12:01 +09:00 committed by GitHub
parent 4285e2f3d4
commit 1bb50afa69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
assets/js/route.js Normal file
View File

@ -0,0 +1,15 @@
function addScript(url) {
var s = document.createElement('script');
s.src = url;
s.type = 'text/javascript';
document.body.appendChild(s);
}
$(document).ready(function() {
var route_names = routes.split(',');
$(route_names).each(function(i, v) {
if($.trim(v).length > 0) {
addScript(base_url + "?route=assetproxy&path=view/public/js/route/" + v + ".js");
}
});
});