Created
March 30, 2012 01:57
-
-
Save toamitkumar/2245739 to your computer and use it in GitHub Desktop.
ashutoshdikshit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day 1 | |
Form.html | |
Excellent. Inline CSS and JS is bad practice. Always create files and include them. | |
Day 2: | |
Tweets.html | |
1. | |
Inline CSS and JS is bad practice. Always create files and include them. | |
2. | |
Hooking inline js to html elements is bad practice. Its always good to follow "Unobtrusive JS" approach. It is clear separation of html from javascript code. MVC on the front-end tier. | |
Read more on this -> http://en.wikipedia.org/wiki/Unobtrusive_JavaScript | |
3. | |
$('<li>'+data[i].text+'</li>').appendTo("#list"); | |
# This will add "li" to the DOM inside loop. Not good for performance. | |
# Its better to build a string inside a loop and add the whole string to the DOM outside of loop. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment