맥도날드 신메뉴 납작버거.jpg
분류:
유머이미지
이름:
오늘괜찮니
등록일: 2022-05-25 14:24
조회수: 2741 / 추천수: 0
67.jpg (85.7 KB)
');
}
*/
};
img.src = src;
};
};
/*
var getScroll = function(){
var de = document.documentElement;
var b = document.body;
return {x: document.all ? (!de.scrollLeft ? b.scrollLeft : de.scrollLeft) : (window.pageXOffset ? window.pageXOffset : window.scrollX), y: document.all ? (!de.scrollTop ? b.scrollTop : de.scrollTop) : (window.pageYOffset ? window.pageYOffset : window.scrollY)};
};
Object.keys = Object.keys || function(o) {
var result = [];
for(var name in o) {
if (o.hasOwnProperty(name))
result.push(name);
}
return result;
};
*/
function viewExpandImage(src, width, height) {
var html = "
";
$("body").addClass('gallery-view').prepend(html);
var window_width = $(window).width();
var window_height = $(window).height();
if (width > window_width) {
$('#original-image').css('margin-left', '0').css('left', '0');
}
if (height > window_height) {
$('#original-image').css('margin-top', '0').css('top', '0');
}
}
$(document).ready(function() {
$("td.board-contents img").each(function(index) {
var checkPPomDomain = new RegExp('(\/\/)+(.*\.ppomppu\.co\.kr)');
var $src = $(this).attr("src");
if (checkPPomDomain.test($src)) {
$(this).css("max-width", "900px");
if ($src.search("/900w_") > 0 && ImageInfo != null && ImageInfo[index] ) {
var imgTag = $("
'+$('
').append(imgTag.clone()).html()+'
');
}
} else {
ImageInfo2.getSize($(this), index);
}
} else {
$(this).css("maxWidth", "900px");
}
});
$("td.board-contents img[class='clickWideIcon']").live("click", function(event) {
$(this).parent().next().click();
});
$("td.board-contents img[class='clickWide']").live("click", function(event) {
scroll_top = $(document).scrollTop();
scroll_left = $(document).scrollLeft();
var $src = $(this).attr('src');
var $idx = $(this).attr('imgidx');
var ix = 0;
for(ix = 0; ix 0) {
$idx = ix;
}
}
if ($src.search("/900w_") > 0) {
var orisrc = $src.replace("/900w_", "/");
if (ImageInfo[$idx]) {
viewExpandImage(orisrc, ImageInfo[$idx].width, ImageInfo[$idx].height);
window.scrollTo(0, 0);
} else {
viewExpandImage(orisrc, ImageInfo2.i[orisrc].width, ImageInfo2.i[orisrc].height);
window.scrollTo(0, 0);
}
} else {
if (ImageInfo2.i[$src] && ImageInfo2.i[$src].width > 900) {
viewExpandImage($src, ImageInfo2.i[$src].width, ImageInfo2.i[$src].height);
window.scrollTo(0, 0);
} else {
viewExpandImage($src, '100%', '100%');
window.scrollTo(0, 0);
}
}
});
$("div[class='dimmed']").live("click", function(event) {
$(this).remove();
$('#original-image').remove();
$('body').removeClass('gallery-view');
$('.wrapper').show();
$('.board-contents p img').show();
$('.zero-clipboard').show();
$(document).scrollTop(scroll_top);
$(document).scrollLeft(scroll_left);
event.preventDefault();
});
$("div[id='original-image']").live("click", function(event) {
$(this).remove();
$('.dimmed').remove();
$('body').removeClass('gallery-view');
$('.wrapper').show();
$('.board-contents p img').show();
$('.zero-clipboard').show();
$(document).scrollTop(scroll_top);
$(document).scrollLeft(scroll_left);
event.preventDefault();
});
});
//-->
호떡 ㅋ
| |
|