Skip to content

Instantly share code, notes, and snippets.

@toamitkumar
Created March 30, 2012 02:10
Show Gist options
  • Save toamitkumar/2245808 to your computer and use it in GitHub Desktop.
Save toamitkumar/2245808 to your computer and use it in GitHub Desktop.
venkateshn
Ajax:
twitter.html
1.
<input id="TWEET" type=button value="Get Tweets" "/>
# Always try to use small case for 'id' attributes. Standard coding practice
2.
$("#add_tweets").append("<li>" + feed[i].text + "</li>");
# 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.
Auto.html
1.
Inline CSS and JS is bad practice. Always create files and include them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment