-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctionality.js
More file actions
162 lines (144 loc) · 5.79 KB
/
Copy pathfunctionality.js
File metadata and controls
162 lines (144 loc) · 5.79 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
//Get the button:
floatButton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function () { scrollFunction() };
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
floatButton.style.display = "block";
floatButton.style.transform = "translateX(0)";
} else {
floatButton.style.transform = "translateX(500%)";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
let Gbtn = document.getElementById("Gbtn");
let Hbtn = document.getElementById("Hbtn");
let Gwrapper = document.getElementById("Gwrapper");
let hotelListing = document.querySelector(".moreHotels");
function morePhotos() {
Gwrapper.innerHTML += `<div class="new-box">
<img src="../imgs/gimg21.jpg"
alt="animal Image" />
</div>
<div class="wide new-box">
<img src="../imgs/gimg22.jpg"
alt="animal Image" />
</div>
<div>
<img src="../imgs/gimg23.jpg"
alt="animal Image" />
</div>
<div>
<img src="../imgs/gimg24.jpg"
alt="animal Image" />
</div>
<div class="tall">
<img src="../imgs/gimg25.jpg"
alt="animal Image" />
</div>
<div class="wide">
<img src="../imgs/gimg26.jpg"
alt="animal Image" />
</div>
<div>
<img src="../imgs/gimg5.jpg"
alt="animal Image" />
</div>
<div class="wide">
<img src="../imgs/gimg18.jpg"
alt="animal Image" />
</div>
<div class="tall" new-box>
<img src="../imgs/gimg29.jpg"
alt="animal Image" />
</div>`
}
// function moreHotels() {
// hotelListing.innerHTML += `<div class="Hcard new-box">
// <!-- card -->
// <div class="Hcard">
// <div class="Himg">
// <img src="../imgs/Aegle marmelos (L.) Corr..png" alt="Manu Mahrani Resort">
// </div>
// <div class="Hcontent">
// <!-- Common Name -->
// <h3>Bel</h3>
// <label><i class="fa fa-map-marker" aria-hidden="true"></i>Widely distributed across India, especially in North and Central India</label>
// <div class="Hdetail">
// <h4> Aegle marmelos (L.) Corr</h4>
// <span></span>
// <ul>
// <li>Digestive disorders</li>
// <li>Diabetes management</li>
// <li>Antipyretic</li>
// <li>Anti-inflammatory</li>
// <li>Antioxidant effects</li>
// <li>Respiratory ailments</li>
// <li>Cardiovascular health</li>
// </ul>
// </div>
// </div>
// <div class="Hpricing">
// </div>
// </div>
// <!-- card -->
// <div class="Hcard">
// <div class="Himg">
// <img src="../imgs/Althaea officinalis L..jpg" alt="Manu Mahrani Resort">
// </div>
// <div class="Hcontent">
// <h3> Marsh Mallow (Eng.)</h3>
// <label><i class="fa fa-map-marker" aria-hidden="true"></i>Cultivated in some North Indian states</label>
// <div class="Hdetail">
// <h4>Althaea officinalis L</h4>
// <span></span>
// <ul>
// <li>Respiratory relief</li>
// <li>Urinary tract support</li>
// <li>Skin conditions</li>
// <li>Anti-inflammatory properties</li>
// <li>Immune system support</li>
// <li>Mild laxative effect</li>
// <li>Pain relief</li>
// </ul>
// </div>
// </div>
// <div class="Hpricing">
// </div>
// </div>
// <!-- card -->
// <div class="Hcard">
// <div class="Himg">
// <img src="../imgs/Annona muricata L..webp" alt="Manu Mahrani Resort">
// </div>
// <div class="Hcontent">
// <h3> Mamphal (Mar.)</h3>
// <label><i class="fa fa-map-marker" aria-hidden="true"></i>Cultivated in various states, especially in South India</label>
// <div class="Hdetail">
// <h4> Annona muricata L.</h4>
// <span></span>
// <ul>
// <li>Anti-cancer properties</li>
// <li>Pain relief</li>
// <li>Antimicrobial activity</li>
// <li>Antihypertensive</li>
// <li>Sedative and anti-anxiety effects</li>
// <li>Anticonvulsant</li>
// <li>Fever reduction</li>
// </ul>
// </div>
// </div>
// <div class="Hpricing">
// </div>
// </div>`
// }
Gbtn?.addEventListener('click', () => {
morePhotos();
});
Hbtn?.addEventListener('click', () => {
moreHotels();
});