forked from SH20RAJ/DynamicLoaderJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.html
39 lines (34 loc) · 927 Bytes
/
index2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<title>Dynamic Content Example</title>
<style>
/* CSS styles for the page */
.content {
display: none; /* Hide content initially */
margin: 20px;
padding: 10px;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<h1>Dynamic Content Example</h1>
<!-- Navigation buttons -->
<button onclick="dl.loadContent('page1')">Page 1</button>
<button onclick="dl.loadContent('page2')">Page 2</button>
<button onclick="dl.loadContent('page3')">Page 3</button>
<!-- Loading indicator -->
<div id="loadingIndicator" style="display: none;">Loading...</div>
<!-- Content area -->
<div id="contentContainer"></div>
<!-- Include DynamicLoader.js -->
<script src="DynamicLoader.js"></script>
<!-- Initialize the library -->
<script>
var dl = (function() {
// ... (DynamicLoader.js code)
})();
</script>
</body>
</html>