I’m currently learning jQuery with the help of the new book from Sitepoint novice to ninja. I’m loving the book so far and it’s definitely helping me understand the world of jQuery but as a complete noob to this library I’m finding the the book is skipping over some of the basics.
For example I have just started to animate a nice navigation menu using CSS Properties, the book uses this code
$(‘#navigation li’).hover(function(){
$(this).animate({paddingLeft: ‘+=15px’}, 200);}, function() {
$(this).animate({paddingLeft: ‘-=15px’}, 200);
});
Which is great I type it in and the animation works without a hitch but my issue is that they don’t explain how the hover function works. Sure I can read the code above and understand it to a degree but it wasn’t till I installed the jQuery sugar plugin which autofills some of the code that I really understood what was going on. if I type $(this).hover into Espresso with sugar installed these options appear.
$(this).hover(over, out)
Ok, so now I can make sense of the above, the first statement is for hover over and the second is for hover out. Shouldn’t things like this be covered in the book? Don’t get me wrong the book is a great way to start learning and using jQuery I’m only 80 pages in and have definitely developed a deeper understanding for the library, I’m just struggling a little with how to layout my code.
So to anyone that it currently trying to learn jQuery with this book I would recommend installing jQuery.sugar for Espresso or another sort of autofill plugin, it’s helped heaps.
A jQuery plugin by Jacek Galanciak to reorder and filter items using animated transitions. (via Lee Majors)
Every now and again you see a new effect or bit of javascript on a website that makes you go OMG! or if your not a teenage girl you just say wow, today I saw just such an effect. vimeo have updated there site to include a really simple but stunning little bit of background animation. Head over to the vimeo site and scroll down to see what I’m talking about.
Now we just have to wait for a jQuery demo to hit the net then we can add all sorts of floating backgrounds to our websites. I think we’re going to be seeing a lot more of this in the future.