I'm a front-end developer with an interest in client-side development through the use of HTML, CSS & JavaScript. I'm an evangelist of HTML5, CSS3, jQuery, standardization & open-source. I don't design the sites you use, I make them work.
I just finished watching the screencast done by Paul Irish and his breakdown of the jQuery source. It provides some great insight to the library and some nice tips to make your code more performant or even doing some duck punching of your own.
Well, as many have probably noticed I haven't written anything in awhile. I've had a lot going on with my wife and 11 month old son and started school in August. I also recently had an operation which put me on the shelf for the last few weeks.
There is some good news though. My jQuery work has continued and so has my knowledge of the library. I have a backlog of several new tutorials I'd like to write which I hope to get to in the coming month(s). Then again the holidays are coming up, but I have some vacation time which I hope to use "wisely".
Having recently adding jQuery to my arsenal of web tools I've been experimenting with new ways of organizing content. While tabs is one obvious way of doing this (tutorial to come), my newly preferred method is the Accordion widget in jQuery UI.
It offers a nice flexible options and can be used for nearly all types of content. And the best part of this particular option has to do with the fact that the required code is very minimal and straightforward. Enjoy!
In my short time of using jQuery I've come across the invaluable method of noConflict(). Why is it so handy? Well, in the world of web design and development, there are lots of very useful JavaScript libraries out there (i.e. YUI, MooTools, Prototype) and several of them use "$" to represent an object. If you are using this syntax within jQuery and another conflicting library simultaneously, you are likely going to run into some unexpected behavior.
Luckily noConflict() is very simple to use and you won't have to go swapping out all your "$" with "jQuery". And to keep it simplistic I'll use the following code to show you how to implement it.
$(function(){
$("#foo").click(// your code here)// any additional code});
With the amount of jQuery tutorials being written, tweeted, and retweeted I keep seeing one common theme in nearly all of them. None of them use the jQuery shorthand to launch their scripts when their DOM is loaded.
Of course there's nothing wrong with this and it is perfectly valid, but if you are able to cut out code, that means you cut down on development. If you are familiar with jQuery then you're most likely familiar with starting your scripts like so: