Coder Social home page Coder Social logo

ecommerce-website's Issues

CV update required of manish

when i was merging the chnages that u had made , i accidently just accepted the changes instead of accepting both the changes . this has led to te fact that my code and your code was there. and it creates a clash of elements in the html. and while i was trying to handle the issue, your details were lost. so we need to work on that as asap @mnshchtri

cannot commit and pull origin from dev branch

I've made additions and committed the modifications to the JavaScript code. Although the commit is visible, I encounter an error when attempting to pull from the 'origin dev' branch.
Screenshot 2024-01-22 at 3 02 39 AM
Here is the code changes in js:

let next = document.querySelector('.next')

let prev = document.querySelector('.prev')

let next1 = document.querySelector('.next1')

let prev1 = document.querySelector('.prev1')

  

//functionality added for giving the popup message alerting whenever the add to cart button is clicked

function handleAddToCartClick(productName) {

alert(productName + " has been added to the cart! Thank You for Shopping.");

}

  

// Add event listeners to all "Add to Cart" buttons

document.addEventListener('DOMContentLoaded', function () {

var addToCartButtons = document.querySelectorAll('.item button');

  

// Loop through each selected button

addToCartButtons.forEach(function (button) {

// Add a click event listener to each button

button.addEventListener('click', function () {

// Get the product name associated with the clicked button

var productName = this.parentElement.querySelector('.name').innerText.trim();

  

// Call the handleAddToCartClick function with the product name as an argument

handleAddToCartClick(productName);

});

});

});

  

next.addEventListener('click', function () {

let items = document.querySelectorAll('.item')

document.querySelector('.slide').appendChild(items[0])

})

  

prev.addEventListener('click', function () {

let items = document.querySelectorAll('.item')

document.querySelector('.slide').prepend(items[items.length - 1])

})

  

next1.addEventListener('click', function () {

let items = document.querySelectorAll('.item1')

document.querySelector('.slide1').appendChild(items[0])

})

  

prev1.addEventListener('click', function () {

let items = document.querySelectorAll('.item1')

document.querySelector('.slide1').prepend(items[items.length - 1])

})

not an issue

so basically this is not an issue , its just a thing that clicked my mind. yea i know i can write this on whatsapp , slack or whatever , but it seems cool while writing here . so why not .
yea the idea was that , we should have made a new project in github in the first place instead of a single repo . that would have allowed us to assign the tasks, track the bugs and many more
@mnshchtri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.