Skip to content

Instantly share code, notes, and snippets.

@motsu0
Last active January 30, 2023 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motsu0/e08bb0b95d94ac4a08c28bc5b0bbfdb0 to your computer and use it in GitHub Desktop.
Save motsu0/e08bb0b95d94ac4a08c28bc5b0bbfdb0 to your computer and use it in GitHub Desktop.
includeHtml({
name_target: '#sample-parent',
//(必須) インクルード先の要素指定。id,class,tanNameで指定。
src_part: 'pathto/sample-part.html',
//(必須) インクルード元のファイルのURL。
src_id: 'sample-div',
//(任意) インクルード元のhtml内で一部分だけ指定したい場合はここでid指定。
type_copy: 'outer',
//(任意) outer or inner
//src_idを指定した場合に、インクルード元の要素のouterHTMLをコピーするかinnerHTMLをコピーするか選択。
src_js: ['pathto/sample-script.js']
//(任意) インクルードした部分に対して適用させたいJavaScriptのファイルのURL。配列指定(1個でも)。
//順番通りに実行されるわけではないので注意。
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment