Ok, I guess I need to rephrase my question now that part of the original has
been answered:

I don't know enough javascript to understand exactly what Shaun's code is
doing, nor do I have enough jQuery experience to rewrite it in jQuery.

Here's what I *want* to do: I want to have jQuery reposition a footer below
a div which has no height (because all its children are absolutely
positioned). This needs to happen both on window load and resize (possibly
even with unhiding content?), in order to keep the footer at the bottom of
any columns which change in size.

Considering that the dimensions plugin doesn't seem to have any facility to
tell me where the bottom of an element is, I think that I need to: grab the
height and top offset from the children of #content; add the top offset and
height of each child together; determine which child has the greatest total
height; and finally set the top of the footer to the result.

I am just not sure how to go about this. I've managed to get the height of
any one container, and set the top of the footer to that, but of course,
it's not down far enough, as I don't have the top offset and such. I can't
figure out how to get only the top offset from the dimensions plugin - it
hands me an array, and I can't seem to cull just the second element out of
it.

I know this seems like a silly endeavor, but it seems ridiculous to tack
Shaun's code on the end of my HTML when jQuery has such a nice mechanism for
firing it off. Also, I've enjoyed noodling around with jQuery, and I've
gotten a number of things to work that I'm sure I would have taken me weeks
to figure out with pure JS.




bmsterling wrote:
> 
> I would assume you can do this quite easily with the dimensions plugin,
> find
> the tallest elements and set the position of the footer to match.  To
> answer
> your question, if done in jquery I believe it would be smaller and faster.
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of deadguy
> Sent: Thursday, January 18, 2007 12:35 PM
> To: [email protected]
> Subject: [jQuery] position clearing ala Shaun Inman
> 
> 
> I've been reading through Transcending CSS by Andy Clarke, and he mentions
> using Shaun Inman's clearance method
> (http://shauninman.com/post/heap/2006/05/22/clearance_position_inline_absolu
> te)
> to position footers when using absolute positioning for layout.
> 
> Since I'm already using jQuery for a number of other things (they are all
> quite simple - I'm still a novice at JS), I was wondering if a jQuery
> version of his script would be smaller/faster or if I ought to just use
> his
> script in addition to the jQuery I'm already using.
> 
> Thanks
> -- 
> View this message in context:
> http://www.nabble.com/position-clearing-ala-Shaun-Inman-tf3035522.html#a8435
> 293
> Sent from the JQuery mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/position-clearing-ala-Shaun-Inman-tf3035522.html#a8671942
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to