kswedberg / jquery-expander

Expand and Collapse HTML content

Home Page:https://kswedberg.github.io/jquery-expander/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UL Break

mgauthier-ME opened this issue · comments

I noticed in issue #28 that the plugin would not close the top list element when it was finished. For example,
<ul>
<li>
</li>
<li>
</li>
</ul>

If the summary were to take only the first element, the resulting code would look like this:
<ul>
<li>
</li>
<span class="read-more"...>
</ul>
This appears to be causing the read more area not to be clickable.

Please let me know if any additional information is required.

Thanks in advance!

Thanks for the report! Can you show me a code snippet where you're calling .expander() so I can have some more context? If you could demonstrate the problem on jsbin.com or jsfiddle.net, that would be even better.

Thank you for responding so quickly! I am working to see if I can get it into a jsfiddle, and will let you know what I find.

Thanks in advance!

I was able to successfully set up the jsfiddle of this, and found that it was actually an IE7 glitch repair that was causing it not to open. I am still in the process of resolving it, so if you are curious: http://jsfiddle.net/mgauthier/JacjT/1/

The first section does not open when "read more" is selected, but the other two are expandable.

Thank you for your help!

What happens if you add expandAfterSummary: true to options object?

That seems to have done the trick! What does expandAfterSummary do?

It places the "read more" <span><a href></a></span> after the <ul> rather than appending to it. Before, it was trying to create an invalid DOM, since only <li> elements are allowed as children of a <ul>.

Glad it's working for you now!