gitfolio | Quickly bootstrap your static portfolio | Portfolio library
kandi X-RAY | gitfolio Summary
kandi X-RAY | gitfolio Summary
gitfolio bootstraps a simple one-page portfolio, based on your github data.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gitfolio
gitfolio Key Features
gitfolio Examples and Code Snippets
Community Discussions
Trending Discussions on gitfolio
QUESTION
I'm trying to update item totals when an image card is clicked and update the corresponding totals and prices in an order panel. See screenshot.
I'm currently incrementing the quantity total onclick in the black circle qty-icon
div on the image card using the "Update food quantity" function below which increments the number, but how do I pass that incremented value to the "0 Items" field in the add-order-panel
panel at the bottom and update the price in "Add to Order"?
Link to GitHub repo
Live GitHub page
...
ANSWER
Answered 2021-Jan-08 at 20:06You're over thinking it :) You're already storing the element your wanting into a variable called "num". Then you're grabbing the text inside of it. Here's what you do.
- redefine num to be the text of the element.
- do this for every other element you want to update the text for.
- then add all of the values of those inside the function.
- save that in a var called total and update that in the area where the total should be
- make sure to start total at 0 every time the function runs or you will compound the value
note you'll want to declare all of your variables globally and then update them locally. Don't declare any variables locally or they will come back undefined when you try to update them in other functions
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gitfolio
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page