How do I add html link to image title

后端 未结 4 1910
北荒
北荒 2021-01-07 07:16

I\'m actually needing to include html links in the longdesc attribute. I\'ve altered prettyphoto to use longdesc instead of title for images, but I need to include html link

4条回答
  •  终归单人心
    2021-01-07 08:00

    This can be done with the longdesc attribute:

    
    

    And then, in thedescription.html:

    Link
    

    One alternative way to do this is by using an OBJECT element, as follows:

    
        Link
    
    

    Also, since you asked for it, here is how to convert html entities automatically in jquery:

    $('
    ').text('Some Link').html(); // the above evaluates to <a href="link.html">Some Link</a>

提交回复
热议问题