Old/소스코드
JQuery를 사용한 페이지 로딩
Sinnak86
2016. 6. 9. 14:01
JQuery를 사용한 page loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<header id="header"></header> | |
</body> |
※index.html(여기에 다른 페이지를 부를 것임)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>This is Header</h1> |
※header.html(이페이지를 붙을거임)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('#header').load("../template/header.html"); | |
}); |
※header.html(#header에 header.html를 붙이는 소스)