-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprodscript.js
40 lines (37 loc) · 1.24 KB
/
prodscript.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
// var divs= document.querySelector(".div1")
// divs.addEventListener("click",desc)
// function desc(e){
// e.preventDefault()
// // window.location.href="demo.html"
// var arrprice=[]
// var price=document.getElementsByClassName("spn")
// for(var i=0; i<price.length; i++){
// // var x=price[i].parentElement.parentElement.parentElement.parentElement;
// // console.log(x)
// var selected=document.querySelector("#sort").value;
// arrprice.sort(function(a,b){
// if(selected="low"){
// return a-b;
// }
// else{
// return b-a;
// }
// })
// arrprice.push(price[i].parentElement.parentElement.parentElement.parentElement)
// }
// displayprod(arrprice)
// }
// // var price= document.querySelector("#priceid")
// // console.log(price)
// function displayprod(arr){
// arr=[]
// var x=document.getElementsByClassName("div1")
// for(var i=0; i<x.length; i++){
// arr.push(x[i])
// }
// return arr
// }
document.querySelector(".div1").addEventListener("click",desc)
function desc(){
window.location.href="jw_marriott_hotel.html"
}