Mercurial > hg > digilib-old
changeset 869:44ee29f20791 jquery
always detach img in embedded mode
author | hertzhaft |
---|---|
date | Sat, 12 Mar 2011 21:22:15 +0100 |
parents | 7ebdc106a61a |
children | 80cc227c1d50 |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Wed Mar 09 00:39:17 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Sat Mar 12 21:22:15 2011 +0100 @@ -980,12 +980,14 @@ scalerUrl = getScalerUrl(data); $img = $elem.find('img'); if ($img.length > 0) { - oldUrl = $img.attr('src'); - if (oldUrl === scalerUrl) { - console.debug("img detach:", $img); - $img.detach(); - } else { - $img = $('<img/>'); + //oldUrl = $img.attr('src'); + //if (oldUrl === scalerUrl) { + // console.debug("img detach:", $img); + // $img.detach(); + //} else { + // $img = $('<img/>'); + // keep title, alt etc. attributes (src gets changed anyway) + $img.detach(); } } else { $img = $('<img/>');