kswedberg / jquery-expander

Expand and Collapse HTML content
https://kswedberg.github.io/jquery-expander/
Other
459 stars 167 forks source link

expand effect is ignored #38

Closed ghost closed 12 years ago

ghost commented 12 years ago

Great plugin! It seems to be one of a kind, which is why I'm hoping to fix this issue instead of writing something else from scratch.

Tested in Firefox and Chrome on Mac and I get the same issue: expandEffect: 'slideDown' simply doesn't work.

First off, I had to remove a paragraph element and replace it with a div. The paragraph element flickered pretty badly on collapse and expand in both browsers, right at the begging of the expand and the end of the collapse.

Here are my options. The collapse works great at any speed I provide. The expand just snaps into place abruptly. I'm researching if this is a quirk with jquery slideDown or not, the doc has a comment saying slideDown won't work if the element has a min-height set but that's not the case.

$('.media_meta dl dd.release_text div').expander({
    collapseEffect: 'slideUp',
    collapseSpeed: 500,
    expandEffect: 'slideDown',
    expandSpeed: 500,
    expandText: 'more',
    slicePoint: 300,
    userCollapseText: 'less',
    widow: 2
});
kswedberg commented 12 years ago

Thanks for the report. Can you post a test case somewhere so I can see for myself what's going on? I prefer http://jsfiddle.net/ or http://jsbin.com/.

thanks again.

ghost commented 12 years ago

Sure! Here you go: http://jsfiddle.net/6dW6U/11/

kswedberg commented 12 years ago

Thank you! You even used an excerpt from one of my favorite books! :)

I'll look into the issue as soon as I can.

ghost commented 12 years ago

thanks!