Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Charcoal00 authored Aug 5, 2024
1 parent 73c1e76 commit 920dcc1
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,37 @@ document.querySelectorAll('.price').forEach(button => {
button.addEventListener
('click', function() {

// Get the span ID from the data attribute
const spanId = this.getAttribute('data-span-id');
// Add the 'highlight' class to the corresponding span element
document.getElementById(spanId).classList.toggle('open-now');

}
);

});




//======= loader =======
document.addEventListener("DOMContentLoaded", function() {

window.addEventListener("load", function() {

var loadder = document.getElementById('loader');
var spinnerr = document.getElementById('spinner')

setTimeout(function() {
loadder.style.opacity = "0";
loadder.style.visibility = "hidden";
}, 1000)

setTimeout(function() {
document.getElementById('main1').style.display = 'block';
document.body.style.overflow = 'visible';
}, 1200);

});

});


0 comments on commit 920dcc1

Please sign in to comment.