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

Add Tooltip to Inline citation #118

Open
someonehere15 opened this issue Apr 15, 2016 · 2 comments
Open

Add Tooltip to Inline citation #118

someonehere15 opened this issue Apr 15, 2016 · 2 comments
Assignees
Milestone

Comments

@someonehere15
Copy link

So making a separate post.
Can you add a tooltip to the inline citation, so it shows the reference when hovering mouse, without the need to click it to jump to the end?
Or you can help me to do it myself.
Thanks

@bpiwowar bpiwowar self-assigned this Apr 15, 2016
@bpiwowar bpiwowar added this to the 0.5.x milestone Apr 15, 2016
@someonehere15
Copy link
Author

Any tip how to do this myself?

@bpiwowar
Copy link
Owner

You have to first use a library to display tooltips (maybe there is one in WordPress), and then modify the javascript code (papercite.js) so that it displays the entries when the mouse is over the citation. For this, you need to modify line 681 of papercite.php so that it wraps the citation into a <span> with a given class, so it can be detected by the javascript, e.g.

$returns .= "<span class='papercite-bibcite-key' value='$num'>$id</span>";

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

No branches or pull requests

2 participants