background preloader

Docs

Facebook Twitter

3 Simple Things to Make Your jQuery Code Awesome. jQuery is one of the most popular (if not the most) JavaScript libraries in existence and a great number of people use it to do some amazing things.

3 Simple Things to Make Your jQuery Code Awesome

Personally, jQuery is what got me excited for learning JavaScript. The problem is that a lot of programmers don't understand that with all that power massive amounts of CPU cycles are used. As much as jQuery engineers try to optimize jQuery, they are always limited in how fast they can make it go. There are a few things that you, as a user of jQuery, can do to make your jQuery code faster. 1 - jQuery Object Caching Caching your jQuery objects may possibly be the best thing you can do to cut your code down to run leaner and meaner. In all of these cases, you could save some DOM searching trips by assigning the jQuery object to a variable (generally prefixed with a dollar sign to distinguish it as a jQuery object), like so: 2 – Selector Optimization The following selectors are ranked from fastest to slowest. 3 – Delegating Events About the Author. jQuery & JavaScript Articles For The Community.

Jquery : Le forum FR d'entraide dédié à jQuery. jQuery Visual Cheat Sheet 1.6. Slide Elements in Different Directions. Although jQuery has a nice set of slide methods — .slideDown(), .slideUp(), and .slideToggle() — sometimes we may want to slide an element in a different direction.

Slide Elements in Different Directions

Fortunately, it's pretty easy to do. Reverse the Slide Direction With the built-in slide methods, elements are shown by sliding them down and into view. But what if we want to slide something from the bottom up and into view? The trick here is to use some judicious CSS. <div id="slidebottom" class="slide"> <button>slide it</button> <div class="inner">Slide from bottom</div></div> To get the inner div to slide up, we'll anchor its bottom edge to the bottom of the bottom of the nearest positioned ancestor (in this case, the #slidebottom div): Other properties such as width, padding, margin, and background-color have been set for these elements, but only the essential properties for modifying the slide behavior are shown above.

Now, we can write the jQuery the same way we would with a traditional slide effect: JavaScript: Try it out: Custom Selectors - jQuery. Select all elements that are in the progress of an animation at the time the selector is run.

Custom Selectors - jQuery

Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-). CSS selectors jQuery. Select all elements that are in the progress of an animation at the time the selector is run.

CSS selectors jQuery

Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-). Selects elements that have the specified attribute with a value containing the a given substring. Selects elements that have the specified attribute with a value containing a given word, delimited by spaces. Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive. Selects elements that have the specified attribute with a value exactly equal to a certain value. Select elements that either don’t have the specified attribute, or do have the specified attribute but not with a certain value. Selects elements that have the specified attribute with a value beginning exactly with a given string. Selects all button elements and elements of type button. Selects all elements of type file. Framework javascript - documentation en francais et actualités.

12 Wesbite to Learn jQuery. Jquery is a great way to get a lot of cool things to happen on your website.

12 Wesbite to Learn jQuery

You must take the time to learn it, in this post I give you 12 Wesbites to Learn jQuery. This is just to get your feet wet its always best to take a class or pick up a book. If you have move websites feel free to post it by leaving a comment. jquery-mix.com jqueryfordesigners.com 15daysofjquery.com.