elfs: (Default)
[personal profile] elfs
Because there was a lot of source code, I decided not to cross-post my latest missive about programming to my LJ. (You're all grateful, right?) It's about javascript, and about the simplest slider/slideshow manager humanly possible via jQuery. I'd never worked with jQuery before yesterday, but a lot of people are asking me if I know it, so... there, now I know it.

The example is about building a horizontal collection of things to look at (a deck of slides) and then manipulating the deck so that only one is visible through a viewport, with some cheap animation effects along the way for good measure.

Enjoy!

Going back to basics: CSS, Viewports, and sliders with jQuery.

Date: 2009-07-27 08:44 pm (UTC)
From: [identity profile] dossy.livejournal.com
Yay, you finally popped your jQuery cherry! It's going to change your life with respect to web development, I promise.

Date: 2009-07-27 08:52 pm (UTC)
From: [identity profile] elfs.livejournal.com
I don't see anything in jQuery that isn't already in Ext-JS or Dojo.

In fact, I am extraordinarily irritated with jQuery's dom manipulation toolkit. Not only does it not have a domHelper function, but the domInsertion primitives hand you back a reference to the jQuery object and not to the DOM object you just generated, which means I have to do some real funky "build-then-find" routines to create a templated DOM objects and then hook up event handlers to objects within it, and I can't use the jQuery generalized finders because, for aggregated containers, that results in new handlers being added to each and every object (again, unless some funky detection is added, which is just gross).

Date: 2009-07-27 08:56 pm (UTC)
From: [identity profile] dossy.livejournal.com
There's nothing in jQuery, Ext-JS, Dojo or YUI that isn't in naked JavaScript itself (obviously), but jQuery makes SO much sense in its implementation and idiomatic expressions and style. Ext-JS and Dojo and YUI and Prototype all do cool stuff, but it feels "awkward" and jQuery just "feels right."

jQuery's returning of a jQuery object is what makes it so powerful and pleasant to use. When you get to the point in your programming where you regularly think in terms of list comprehensions, jQuery expressions become a very natural translation from your thought to executable code.

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 22nd, 2026 07:05 pm
Powered by Dreamwidth Studios