[jQuery] New jQuery Subtype -- methods attached to subset of jQuery objects

[jQuery] New jQuery Subtype -- methods attached to subset of jQuery objects


This is more of a OOP philosophical question on how to create new
types of jQuery objects, and it's probably not supported but I keep
WANTING to do this. I have a complex list element representing an
album -- it has h2s and h3s for artist & title, img for album art, a
custom "sprite" based rating control, audio playback controls, etc.
This album element needs to be positioned and resized to various
sizes. Naturally I want this to be a real OBJECT that knows how to
resize itself. So, as opposed to having an external script "reach
into" the album to resize all the sub-elements manually, with tricky
scaling of rating controls, etc, I want to simply call a
"resizeTo(percentage)" on the object, and it simply KNOWS how to
resize itself.
Naturally, I can create a normal Object that has a reference to the
album jQuery object, and all logic is contained within that object.
But the problem is that I have to store these objects in an abstract
container instead of the elegance of simply having the DOM objects
queried/empowered using jQuery. It REALLY seems like I should be able
to create a new subtype of jQuery that attaches these new methods to
those objects that I select using a modified jQuery selector -- maybe
something like jQueryAlbum("li.album").resizeTo(50);
Is there another way to think about this or achieve this? Whadayah
think?