This is what most jQuery code will start with. The .ready will wait until the page is done loading so that the code doesn't start prior.
Another thing jQuery can do in animate things. With this code above when the button is clicked the div's dimensions and positions are changed as well as its opacity.
This is someone else's code they use to create a smooth scrolling effect on websites. This is something that I can really learn from because have single page scrolling sites with smooth scrolling in my opinion the best way to have them. Using jQuery to do this is far easier than trying to do it with CSS and HTML alone.
No comments:
Post a Comment