Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

can a link do one thing on hover and another thing on click

I am using Sugarcube 1 in Twine 1.4

The following code, defined by CSS, displays a tooltip when hovering over the link text:

<a data-passage="#" class="tooltip"><span style="text-align: left; font-family: arial;">This is the text of the tooltip when it pops up</span>clickMe</a>

When the user clicks (not hovers) on the link "clickMe," I want the click to take the user to an external web page. Is it possible to construct a link so that hover does one thing and click does another?

Comments

  • edited March 2016
    Please use the C button in the toolbar above the comment field to wrap your code examples within a code tag, it makes them easier to find/read.

    What you are describing is a standard HTML hyperlink combined with whatever CSS you are using to display the tooltip.
    <a href="http://google.com/"; target="_blank" class="tooltip"><span style="text-align: left; font-family: arial;">This is the text of the tooltip when it pops up</span>clickMe</a>
    note: I had to wrap the above example using quote because code adds a semi colon to URLs
  • Silly me. It's a wonder I can get myself dressed in the morning. Thank you for your patience.
  • @rickrawson
    You should mark this question as answered, so it stops appearing in the Unanswered category.
Sign In or Register to comment.