Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space between spans creates space inside link #122

Closed
lucasbasquerotto opened this issue Jan 26, 2017 · 2 comments
Closed

Space between spans creates space inside link #122

lucasbasquerotto opened this issue Jan 26, 2017 · 2 comments

Comments

@lucasbasquerotto
Copy link

lucasbasquerotto commented Jan 26, 2017

This plugin is working fine for me for almost all cases, but when a link is separated in 2, the second part was in a new line.

I solved that using fadeIn and fadeOut as the expandEffect and collapseEffect, respectively, as exposed here.

Although the problem was almost solved, the link had a space between the 2 parts. Looking for the cause with the browser tools, I've found that there is a space between the span tags with classes read-more and details, that are generated automaticaly by the plugin, as shown below:

<a href="https://my.url.com" class="linkified" target="_blank">https://</a><span class="read-more" style="display: none;">… <a href="#" class="more-link">Read More</a></span> <span class="details" style="display: inline;"><a href="https://my.url.com" class="linkified" target="_blank">my.url.com</a>[...more html]

The space is in this part [...]Read More</a></span> <span class="details"[...].

The link appears as https:// my.url.com.

The link works fine if I click in any part of it, but the space is not good for the user experience IMO.

I don't know if you have control overs the space between the spans, but it would be great if both spans had no space between them.

Thanks for the plugin, anyway :)

@martin-oz
Copy link

The space is an option that you can modify.

https://github.com/kswedberg/jquery-expander#options

// text to include between summary and detail. Default ' ' prevents appearance of
// collapsing two words into one.
// Was hard-coded in script; now exposed as an option to fix issue #106.
detailPrefix: ' ',

@lucasbasquerotto
Copy link
Author

@martin-oz Thanks! That solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants