-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAC_HOME.js
168 lines (145 loc) · 5.96 KB
/
AC_HOME.js
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
163
164
165
166
167
168
let data = [
{
img:"https://m.media-amazon.com/images/I/815QEibJCwL._SL1500_.jpg",
name:"LG 1.5 Ton 5 Star DUAL Inverter Split AC",
price:"₹45,990"
},
{
img:"https://m.media-amazon.com/images/I/61hQvWQiYAL._SX679_.jpg",
name:"Lloyd 1.5 Ton 3 Star Inverter Split AC",
price:"₹35,990"
},
{
img:"https://m.media-amazon.com/images/I/61mLZha51UL._SL1500_.jpg",
name:" Haier 1.5 ton 3 Srat Triple Inverter Intelli Smart Split AC",
price:"₹45,990"
},
{
img:"https://m.media-amazon.com/images/I/61MV+cJP9UL._SX679_.jpg",
name:"Lloyd Stylus 1.5 Ton 3 Star Wi-Fi Inverter Split AC ",
price:"₹45,990"
},
{
img:"https://m.media-amazon.com/images/I/815QEibJCwL._SL1500_.jpg",
name:"LG 1.5 Ton 5 Star DUAL Inverter Split AC",
price:"₹45,990"
},
{
img:"https://rukminim2.flixcart.com/image/200/200/cms-rpd-img/55fdefdd0e3047bfb3fe5836b091547e_185a717db20_image.jpeg?q=90",
name:"Hindware Smart Appliances 45 L Room/Personal Air Cooler (N/A, XENO)",
price:"₹4,990"
},
{
img:"https://rukminim2.flixcart.com/image/612/612/xif0q/air-cooler/p/4/r/-original-imah4b6mmfnwhagx.jpeg?q=70",
name:"Hindware Smart Appliances 45 L Room/Personal Air Cooler (N/A, XENO)",
price:"₹5,990"
},
{
img:"https://rukminim2.flixcart.com/image/612/612/xif0q/air-cooler/w/e/q/150-150-thar-150-2024-air-cooler-90l-water-tank-38mm-heat-sink-original-imahybpwhzpvbwhn.jpeg?q=70",
name:"TOMASHI 90 L Window Air Cooler ",
price:"₹15,990"
},
{
img:"https://rukminim2.flixcart.com/image/612/612/xif0q/air-cooler/b/t/l/-original-imah4b8zf5fzrebq.jpeg?q=70",
name:"BAJAJ 36 L Room/Personal Air Cooler ",
price:"₹5,940"
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"BAJAJ 55 L Window Air Cooler ",
price:"₹7,940"
}
]
let Container = document.getElementById("container")
data.forEach((items)=>{
let mainDiv = document.createElement("div")
let img=document.createElement("img")
img.src=items.img
let prdctName = document.createElement("h4")
prdctName.innerHTML = items.name
let span1 = document.createElement("span")
span1.style.display="flex"
let pdrctPrice = document.createElement("h3")
pdrctPrice.innerHTML = items.price
let buyBtn = document.createElement("button")
buyBtn.innerHTML = "Buy"
mainDiv.appendChild(img)
mainDiv.appendChild(prdctName)
mainDiv.appendChild(span1)
span1.appendChild(pdrctPrice)
span1.appendChild(buyBtn)
document.getElementById("Obj_Div").appendChild(mainDiv)
mainDiv.addEventListener("mouseover",()=>{
mainDiv.style.border="4px solid aqua"
mainDiv.style.boxShadow=" 0px 0px 20px white"
})
mainDiv.addEventListener("mouseleave",()=>{
mainDiv.style.border="none"
mainDiv.style.boxShadow="none"
})
mainDiv.addEventListener("click",()=>{
// mainDiv.style.height="100vh"
// mainDiv.style.width="100vw"
// mainDiv.style.display="block"
// Container.style.display="none"
})
})
let data2=[
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
{
img:"https://rukminim2.flixcart.com/image/312/312/xif0q/air-cooler/z/q/9/160-160-shield-series-solair-55-with-duratuff-pro-motor-inverter-original-imah234hxuy6fdmf.jpeg?q=70&crop=false",
name:"Coller",
price:"2444",
},
]
data2.forEach((items2)=>{
let mainDiv = document.createElement("div")
mainDiv.style.border="none"
let img = document.createElement("img")
img.src=items2.img
let prdctName=document.createElement("h3")
prdctName.innerHTML=items2.name
let price = document.createElement("h2")
price.innerHTML=items2.price
mainDiv.addEventListener("mouseover",()=>{
mainDiv.style.border="4px solid #e3e1e1"
mainDiv.style.boxShadow=" 0px 0px 20px white"
})
mainDiv.addEventListener("mouseleave",()=>{
mainDiv.style.border="none"
mainDiv.style.boxShadow="none"
})
mainDiv.appendChild(img)
mainDiv.appendChild(prdctName)
mainDiv.appendChild(price)
document.getElementById("Obj_Div2").appendChild(mainDiv)
})