I wanted to know how sites do their animations, loading content without loading the entire page etc, so I googled for sites using jquery and found this http://docs.jquery.com/Sites_Using_jQuery. When I looked at the code of several sites, I dint find any one of them using methods like fadein() fadeout() or like my plain and simple code
$.ajax({type: "POST",
url: "page.php",
data: data,
beforeSend: function(pager) {etc. etc.
Look at this site http://www.2minuteexplainer.com/ or take stackoverflow.com itself. They’re all doing animations and page loading and everything else but not using fadein() fadeout() and other code like I posted above. How do they do this, and is there a way of getting a peek into their code.
I believe the website you gave as an example is actually “minimising” their JS code. Therefore, it could be that the methods like fadeIn() are obfuscated somewhat.
I wouldn’t worry about this too much.
fadeIn() and fadeOut() in jQuery have been around a long time and are very good at their respective tasks. No reason to not want to use them that I can see.
On the other hand, you could also look at “animate()” in jQuery, which allows you to animate a specific CSS property. In the context of fading, they might animate on the “opacity” property.
jQuery actually have an opacity demo further down this page:
http://api.jquery.com/animate/
Good luck!