jScrollPane and Cufon together. Can someone make it work?

367 views Asked by At

I used cufon inside of my scrollpanel elements as you can see in http://www.timersys.com/demos/flatbrook/grass-fed-beef/

Problem is that the bottom of divs are being chop off.

I searched on JScrollpane google groups but there is no solution available. When cufon is there JScrollpane calculates wrong the height.

I already tried to exceute cufon before and after jscrollpane. Also triend to exceute jscrollpane with cufon callback option. But always i get same result.

Anyone around with a solution that can help?

Thanks to all

2

There are 2 answers

4
jennyfofenny On BEST ANSWER

Have you tried to add any bottom padding to the div containing the jScrollPane?

EDIT: Alright, the above answer is a workaround, but after having gone over your problem: http://jsfiddle.net/jennyfofenny/zM4hS/, I believe your answer is to add a Cufon.now() call between your Cufon.replace line and your .jScrollPane() line. This should solve your problem in all scenarios that I've tested for.

2
vitch On

The problem is that jScrollPane doesn't know how big the text will be once cufon has done its substitution... So it incorrectly calculates the height of the content. The correct solution should be to use the cufon complete callback to initialise jScrollPane but you say you tried that and it didn't work...

Do you have a page showing how it looked when you were using the cufon callback? If it really doesn't work then it would suggest a bug in one script or the other...

Another solution would be to use the autoReinitialise setting for jScrollPane e.g.

http://jscrollpane.kelvinluck.com/auto_reinitialise.html