KevinBatdorf / liquidslider

A Responsive jQuery Content Slider
161 stars 62 forks source link

Get Auto Height Of Inner Content #133

Closed mazhardesigner closed 10 years ago

mazhardesigner commented 10 years ago

Hello there,

I am using your slider here on my site http://julianreimer.de/. When i got to "Termine" link and change the calender date. It only take the height of the first largest date, but when i click the another date which has more text than first, it cut offs the page. Please check this image Free Image Hosting.

Please provide me solution for this asap.

Thanks in advance.

KevinBatdorf commented 10 years ago

Here's your asap answer :) If you need to adjust the height after the slider is built, you have to assign a click event that fires when you click on the calendar dates.

var api = $.data( $('#slider-4')[0], 'liquidSlider');
$(".dates-bar a").on("click", function() {
     api.adjustHeight(false, api.getHeight())
});
mazhardesigner commented 10 years ago

I try that, but the height get adjust after i resize or open a firebug panel. It still cuts off the text like before.

Also can we adjust the height globally, as i am using some accordian too here on "Führerschein" link.

KevinBatdorf commented 10 years ago

That same function runs when the browser is resized. Specifically, this function:

var height = (_this.options.autoHeight) ? _this.getHeight() : _this.getHeighestPanel(_this.nextPanel);
_this.adjustHeight(false, height);

You can run that function at any time though, its the same concept.

mazhardesigner commented 10 years ago

No effect from above code.

KevinBatdorf commented 10 years ago

The above code will not work, but the function in this comment should work.

api.adjustHeight(false, api.getHeight())

It simply updates the height to the height of the contents within the container. However, if the contents are floated and the browser is unable to determine the height, that could be an issue.

mazhardesigner commented 10 years ago

Can you write me full running code for all containers, i am unable to get it work.

mazhardesigner commented 10 years ago

Can you write me full running code for all containers, i am unable to get it work.

KevinBatdorf commented 10 years ago

Are you making an offer to hire me? I would love to drop all my other projects and just work on your commercial project, but unfortunately that's not how the world works.