jquery-expander icon indicating copy to clipboard operation
jquery-expander copied to clipboard

Show / Hide behaves badly with <p> tags in .expand div

Open nomaddesign opened this issue 12 years ago • 4 comments

If you add paragraph tags inside the .expander element the show / hide shows or hides the entire text..... not just the expanded (read more) text. Is there a way to configure jquery-expander to avoid this? I'm I missing something simple?

Try adding paragraph tags to this and see what I mean: http://jsfiddle.net/6dW6U/14/

Thanks!!!!

nomaddesign avatar Aug 01 '12 02:08 nomaddesign

That is not a bug but a feature :) Se example nr. 3 on the demo page specifically about block elements: http://plugins.learningjquery.com/expander/demo/index.html

tillebeck avatar Aug 24 '12 08:08 tillebeck

@tillebeck is right. The text is sliced at the appropriate point, and that is shown initially. When "expanded," that first, sliced, text is hidden while the entire content is shown.

@nomaddesign: If we're misunderstanding your report, feel free to re-open this issue or open another with an example of it failing.

Thanks!

kswedberg avatar Aug 24 '12 13:08 kswedberg

Behavior with block element only: http://jsfiddle.net/6dW6U/14/ -This works great -

Behavior with

tags inserted inside block element http://jsfiddle.net/y8JnX/

Now the behavior changes dramatically. The text completely disappears and then reappears and starts expanding. The resulting animation is -jarring- and confusing to viewers because it appears the text has changed NOT expanded.

nomaddesign avatar Aug 24 '12 22:08 nomaddesign

For now, my recommendation would be to use a different effect. Either fadeIn/fadeOut or show/hide. Sorry. :(

kswedberg avatar Sep 15 '12 23:09 kswedberg