Mercurial > hg > digilib-old
comparison client/digitallibrary/jquery/jquery.digilib.js @ 869:44ee29f20791 jquery
always detach img in embedded mode
author | hertzhaft |
---|---|
date | Sat, 12 Mar 2011 21:22:15 +0100 |
parents | 7ebdc106a61a |
children | 80cc227c1d50 |
comparison
equal
deleted
inserted
replaced
862:7ebdc106a61a | 869:44ee29f20791 |
---|---|
978 // embedded mode -- try to keep img tag | 978 // embedded mode -- try to keep img tag |
979 $elem.addClass('dl_embedded'); | 979 $elem.addClass('dl_embedded'); |
980 scalerUrl = getScalerUrl(data); | 980 scalerUrl = getScalerUrl(data); |
981 $img = $elem.find('img'); | 981 $img = $elem.find('img'); |
982 if ($img.length > 0) { | 982 if ($img.length > 0) { |
983 oldUrl = $img.attr('src'); | 983 //oldUrl = $img.attr('src'); |
984 if (oldUrl === scalerUrl) { | 984 //if (oldUrl === scalerUrl) { |
985 console.debug("img detach:", $img); | 985 // console.debug("img detach:", $img); |
986 $img.detach(); | 986 // $img.detach(); |
987 } else { | 987 //} else { |
988 $img = $('<img/>'); | 988 // $img = $('<img/>'); |
989 // keep title, alt etc. attributes (src gets changed anyway) | |
990 $img.detach(); | |
989 } | 991 } |
990 } else { | 992 } else { |
991 $img = $('<img/>'); | 993 $img = $('<img/>'); |
992 } | 994 } |
993 } | 995 } |