JQueryの処理共通化メモ ※モバイルでも利用可能です。 js, CSSファイルの一元管理 共通して読み込みたいjsやcssなどを記述、少し改良すればmeta情報の書き出しなども可能 loader.js // 画面動作に必要な外部ファイル (function() { var htmlRoot = 'view'; var jsRoot = '/js'; var cssRoot = '/css'; var reg = new RegExp('^(.+?)://(.+?):?(/.*)?$'); var s = reg.exec(location.href); var url = s[3]; url = url.slice(1); url = url.slice(0, url.indexOf('/')); url = s[1] + '://' + s[2] + '/' + url; var b
![Javascript:処理の共通化メモ - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/07dc90d09926dd4b99c6e4c7903a897ca0ea9687/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9SmF2YXNjcmlwdCVFRiVCQyU5QSVFNSU4NyVBNiVFNyU5MCU4NiVFMyU4MSVBRSVFNSU4NSVCMSVFOSU4MCU5QSVFNSU4QyU5NiVFMyU4MyVBMSVFMyU4MyVBMiZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTU2JnR4dC1jbGlwPWVsbGlwc2lzJnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9ZGI0M2Y4NzExZjI4MWZiMTU0ZmVhYzljZDAwYjI0NDk%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwdHN1bmFraSZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9YmRmOGFiMjJhYWI1MDMxNzZhYzFjM2U0Yjg1ZGJlMjY%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3D4d1cc65bc6cec331f22957232e0d83d5)