ui-shopping-cart's People
ui-shopping-cart's Issues
Use button instead of input type="submit"
https://github.com/jihan2032/UI-Shopping-cart/blob/master/shopping_cart.html#L102
This way you will avoid selecting the input accidentally using CSS
Blocks are using tables
We didn't discuss how to do it and I said don't do it. Keep that issue opened so that in the futuer we use divs instead :)
The JavaScript Part
I am impressed. Let me tell you what I liked
- Appending the $ to the beginning of the variables that contain jQuery object
- Caching the elements by using variables
- Properly walking the DOM
My only advice is, when you pass arguments to a funtion make sure you use those arguments ... Otherwise just ignore them. Example:
$(document).on('click', '.sub-btn', function(ev) {
You are passing the event as ev
and you are not using it inside the function. If you're not going to use it, omit it.
Wrap sitemap links inside a ul
This way the links will be grouped together. I am talking about the links on the footer
Using a common title for the footer links
Congratulations. So far you are the best student to use document outline. I would suggest convert the footer h1
s to h2
and use a visually hidden h1
that have the text Sitemap inside it :)
Use a header for this title
https://github.com/jihan2032/UI-Shopping-cart/blob/master/shopping_cart.html#L30
This way it will be marked as a title
Proper file naming
This assignment is going to grow. What you are building here is the homepage. It should be renamed to index.html :)
Subscription form input
You are missing the type attribute :)
https://github.com/jihan2032/UI-Shopping-cart/blob/master/shopping_cart.html#L101
It should be set to email. This way the browser will validate the input as an email without using any 3rd party library
Using a single container for all the elements
I see that you are using the class container
on every section. Why not use a common div
with the class container
to wrap them all? That's better.
Move JavaScript to the bottom
I love what you did with this:
<script>
window.jQuery ||
document.write('<script src="scripts/vendor/jquery.min.js"><\/script>')
</script>
<script src="scripts/main.js"></script>
But please move it to the bottom of the page :D It's a good practice to move JavaScript to the bottom
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.