Frage

I am creating a site with some pictures on it of me and my friends. To be able to view those photos quickly I've added the Milkbox javascript to my site (Milkbox Site). You can add photo's like this:

<a href="img01.png" data-milkbox="albumsorting" title="Photo description goes here."><img src="thumbs/thumbimg01.png" /></a>

In the title I want to add a download link for the photo. This should look like this:

<a href="img01.png" data-milkbox="albumsorting" title="<a href="img01.png">Download photo</a> | Photo description goes here."><img src="thumbs/thumbimg01.png /></a>

Does anyone have any experience using Milkbox and this way (or another) of adding Download links to the description?

War es hilfreich?

Lösung

Milbox does support it and it's even in the doc.

use html entities to convert your text - in your case '<a href="img01.png">Download photo</a>`:

<a href="img01.png" data-milkbox="albumsorting" title="&lt;a href=&quot;img01.png&quot;&gt;Download photo&lt;/a&gt;  | Photo description goes here."><img src="thumbs/thumbimg01.png /></a>

Andere Tipps

No. All attributes exept alt only accept plain text.

However, you can achieve your goal with custom tooltips from a javascript library like bootstrap.

alt serves as a way for old browsers to show content when the original isn't compatible.

Example:

<div alt="<div> your browser cannot display the content"> <intricate content/></div>

EDIT: Milkbox offers support fort this.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top