mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
safari, 크롬등에서 img 의 width속성값이 없을 경우 크기를 구하지 못하는 문제로 크기를 구하지 못하면 resize 하지 않도록 resize_image 애드온의 동작을 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6429 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
900f6982a7
commit
9944e9e367
1 changed files with 2 additions and 0 deletions
|
|
@ -166,6 +166,7 @@ $(document).ready(function(){
|
|||
var img = $(this);
|
||||
var width = img.attr("width");
|
||||
if(!width) width = img.width();
|
||||
if(!width) return;
|
||||
img.attr("orig_width",width);
|
||||
img.attr("width",1);
|
||||
});
|
||||
|
|
@ -173,6 +174,7 @@ $(document).ready(function(){
|
|||
|
||||
$(this).find("img").each(function(){
|
||||
var img = $(this);
|
||||
if(!img.attr("orig_width")) return;
|
||||
var src = img.attr("src");
|
||||
img.attr("width",img.attr("orig_width"));
|
||||
img.removeAttr("orig_width",'');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue