質問

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?

役に立ちましたか?

解決

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>

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top