Auto Height (Absolute Positions)

Tom's Avatar

Tom

30 Aug, 2012 02:09 PM

Loving the HTML Slider. But I have two issues

I am implementing it into a WP build at the moment and am struggling with a few aspects of it.

I am writing my own version of it into WP (the WP plugin does not do exactly what I wanted - I needed it to be a [gallery] replacement rather than a standalone thing)

Anyway PROBLEM 1 : Auto Height based on containing Div.

http://jsfiddle.net/64r5R/

My site has three elements, a top header, a bottom footer, and a content area wedged between the two where I want the slider to sit to display a portfolio.

Easy enough! But i want it to auto scale.

I am trying to use the autoScaleSliderHeight to set a height, and have the following variable set to return the pageheight dynamically

var pageheight =(tj('#gallery-content').height()*0.334)

For a really odd reason is completely messing up the height (making it three times as big) thus the 0.334.

Any ideas of a better way to do this? Or why it is three times as large etc?

Issue 2: iPad scroll

The other issue I am having is to do with using it on an iPad - it scrolls beautifully for the first slide, then when it comes to slide 1 again, it is like dragging a brick? Was I meant to initialize something for touch?

Help much appreciated!

  1. Support Staff 1 Posted by Dmitry Semenov on 30 Aug, 2012 09:19 PM

    Dmitry Semenov's Avatar

    Hi,

    You should use autoHeight option, not autoScaleSliderHeight, they're for differnt situations (take a look in docs for autoHeight option explanation).

    Don't really understand your second issue, can you send me a link to this page?

    Dmitry

  2. 2 Posted by Tom on 03 Sep, 2012 09:03 AM

    Tom's Avatar

    Ah perfect. I have amended the height and it works fine on the desktop now.

    Only oddity is that it appears about 50% of the size it should on the iPad - probably a problem matching the #div height.

    The second issue I have resolved (i think) by replacing the slider.js with the minified version from the template file I was using as my base (http://dimsemenov.com/plugins/royal-slider/visible-nearby/)

    I think I should be alright on my own from here out - but thanks for the help!

    The site I am developing for my client with the slider is here: http://development.tjhole.com/mc_d1/

    PS. Thanks for the quick reply, and sorry for the slow reply as I was away for the weekend

  3. 3 Posted by Tom on 03 Sep, 2012 12:22 PM

    Tom's Avatar

    Ah ignore me - autowidth was screwing with things. Removed and works perfectly now!

  4. Dmitry Semenov closed this discussion on 05 Sep, 2012 05:07 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac