Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jdl8422

macrumors 6502
Original poster
Jul 5, 2006
491
0
Louisiana
I am currently doing a website that uses the coda slider for the main content. There are 6 or so navigation buttons on the top of the div layer. When you click on the nav, the content slides over using javascript. That part works fine. Does anyone know of a way to dynamically adjust the height of each new window that slides over. i want it to automatically adjust height based on content.

Here is an example of the coda slider: http://www.ndoherty.com/demos/coda-slider/1.1.1/
 
Looking at the implementation, it would be somewhat hard to do. The height of the window is based on the max height of the windows. Even though you're only viewing one window at a time, the others are still there so the CSS is accommodating them. You'd have to calculate the actual height being used by all of the content, which is doable, but can be a touch cumbersome and could be hard to integrate into the existing JavaScript code.

I'm just giving you this info so you realize it's not a simple edit.
 
Thats what I thought. I thought it may be easier because each window has the same class called .panel. So I was curious if I could just use a seperate class for each window so there would be different heights. I'm not a javascript expert so I'm not 100% sure if its possible. Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.