board.js 파일에 아래 항목을 추가 해주세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jQuery.resimg = function(element, options){
var setting = { imageWidth:600, borderColor:false }
$.extend(setting, options);
var imageWidth = setting.imageWidth;
var borderColor = setting.borderColor;
$(element).each(function(){
var img_width = $(this).outerWidth();
var img_height = $(this).outerHeight();
//원래 사이즈를 저장한다.
$(this).attr("tmp_width", img_width);
$(this).attr("tmp_height", img_height);
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(img_width > imageWidth) {
imageHeight = parseFloat(img_width/ img_height);
$(this).width(imageWidth).height(parseInt(imageWidth / imageHeight)).css("cursor", "pointer");
//$(this).width(imageWidth).css("cursor", "pointer");
}
if (borderColor) $(this).css({ "border" : "1px solid "+ borderColor });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
그리고 view스킨 파일 최하단스크립트를 아래와 같이 수정하세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//제이쿼리 임포트
<script language="JavaScript" src="<?="$g4[path]/js/jquery-latest.js"></script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
$(document).ready(function(){
$.resimg("img[name='target_resize_image[]']", {imageWidth:<?=(int)$board[bo_image_width]?>});
//resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
});
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jQuery.resimg = function(element, options){
var setting = { imageWidth:600, borderColor:false }
$.extend(setting, options);
var imageWidth = setting.imageWidth;
var borderColor = setting.borderColor;
$(element).each(function(){
var img_width = $(this).outerWidth();
var img_height = $(this).outerHeight();
//원래 사이즈를 저장한다.
$(this).attr("tmp_width", img_width);
$(this).attr("tmp_height", img_height);
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(img_width > imageWidth) {
imageHeight = parseFloat(img_width/ img_height);
$(this).width(imageWidth).height(parseInt(imageWidth / imageHeight)).css("cursor", "pointer");
//$(this).width(imageWidth).css("cursor", "pointer");
}
if (borderColor) $(this).css({ "border" : "1px solid "+ borderColor });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
그리고 view스킨 파일 최하단스크립트를 아래와 같이 수정하세요.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//제이쿼리 임포트
<script language="JavaScript" src="<?="$g4[path]/js/jquery-latest.js"></script>
<script language="JavaScript" src="<?="$g4[path]/js/board.js"?>"></script>
<script language="JavaScript">
$(document).ready(function(){
$.resimg("img[name='target_resize_image[]']", {imageWidth:<?=(int)$board[bo_image_width]?>});
//resizeBoardImage(<?=(int)$board[bo_image_width]?>);
drawFont();
});
</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
댓글 1개
RINIX
16년 전
파폭에서 이미지 팝업 띄울시 에러가 있어 약간의 코드를 수정했습니다.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jQuery.resimg = function(element, options){
var setting = { imageWidth:600, borderColor:false }
$.extend(setting, options);
var imageWidth = setting.imageWidth;
var borderColor = setting.borderColor;
//alert($(element).children().get().length);
$(element).each(function(){
var img_width = $(this).outerWidth();
var img_height = $(this).outerHeight();
//원래 사이즈를 저장한다.
//$(this).attr("tmp_width", img_width);
//$(this).attr("tmp_height", img_height);
var i = $(element).index($(this));
$(element)[i].tmp_width = img_width;
$(element)[i].tmp_height = img_height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(img_width > imageWidth) {
imageHeight = parseFloat(img_width/ img_height);
$(this).width(imageWidth).height(parseInt(imageWidth / imageHeight)).css("cursor", "pointer");
//$(this).width(imageWidth).css("cursor", "pointer");
}
if (borderColor) $(this).css({ "border" : "1px solid "+ borderColor });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jQuery.resimg = function(element, options){
var setting = { imageWidth:600, borderColor:false }
$.extend(setting, options);
var imageWidth = setting.imageWidth;
var borderColor = setting.borderColor;
//alert($(element).children().get().length);
$(element).each(function(){
var img_width = $(this).outerWidth();
var img_height = $(this).outerHeight();
//원래 사이즈를 저장한다.
//$(this).attr("tmp_width", img_width);
//$(this).attr("tmp_height", img_height);
var i = $(element).index($(this));
$(element)[i].tmp_width = img_width;
$(element)[i].tmp_height = img_height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(img_width > imageWidth) {
imageHeight = parseFloat(img_width/ img_height);
$(this).width(imageWidth).height(parseInt(imageWidth / imageHeight)).css("cursor", "pointer");
//$(this).width(imageWidth).css("cursor", "pointer");
}
if (borderColor) $(this).css({ "border" : "1px solid "+ borderColor });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 144 | ||
| 8229 | 9년 전 | 126 | ||
| 8228 |
커네드커네드
|
9년 전 | 166 | |
| 8227 | 9년 전 | 210 | ||
| 8226 | 9년 전 | 227 | ||
| 8225 | 9년 전 | 206 | ||
| 8224 | 9년 전 | 211 | ||
| 8223 | 9년 전 | 180 | ||
| 8222 |
|
9년 전 | 252 | |
| 8221 | 9년 전 | 161 | ||
| 8220 | 9년 전 | 192 | ||
| 8219 | 9년 전 | 162 | ||
| 8218 | 9년 전 | 197 | ||
| 8217 |
star3840
|
9년 전 | 173 | |
| 8216 | 9년 전 | 242 | ||
| 8215 | 9년 전 | 185 | ||
| 8214 | 9년 전 | 292 | ||
| 8213 | 9년 전 | 253 | ||
| 8212 | 9년 전 | 161 | ||
| 8211 | 9년 전 | 337 | ||
| 8210 | 9년 전 | 338 | ||
| 8209 | 9년 전 | 410 | ||
| 8208 | 9년 전 | 300 | ||
| 8207 | 9년 전 | 303 | ||
| 8206 |
|
9년 전 | 258 | |
| 8205 | 9년 전 | 239 | ||
| 8204 | 9년 전 | 217 | ||
| 8203 | 9년 전 | 288 | ||
| 8202 | 9년 전 | 206 | ||
| 8201 | 9년 전 | 252 | ||
| 8200 | 9년 전 | 258 | ||
| 8199 | 9년 전 | 271 | ||
| 8198 | 9년 전 | 235 | ||
| 8197 | 9년 전 | 225 | ||
| 8196 | 9년 전 | 638 | ||
| 8195 | 9년 전 | 239 | ||
| 8194 | 9년 전 | 350 | ||
| 8193 | 9년 전 | 253 | ||
| 8192 | 9년 전 | 268 | ||
| 8191 | 9년 전 | 216 | ||
| 8190 | 9년 전 | 212 | ||
| 8189 | 9년 전 | 274 | ||
| 8188 | 9년 전 | 207 | ||
| 8187 | 9년 전 | 211 | ||
| 8186 | 9년 전 | 214 | ||
| 8185 | 9년 전 | 377 | ||
| 8184 | 9년 전 | 166 | ||
| 8183 | 9년 전 | 389 | ||
| 8182 | 9년 전 | 249 | ||
| 8181 | 9년 전 | 198 | ||
| 8180 | 9년 전 | 778 | ||
| 8179 | 9년 전 | 549 | ||
| 8178 | 9년 전 | 405 | ||
| 8177 |
kiplayer
|
9년 전 | 405 | |
| 8176 | 9년 전 | 436 | ||
| 8175 | 9년 전 | 326 | ||
| 8174 | 9년 전 | 320 | ||
| 8173 | 9년 전 | 407 | ||
| 8172 | 9년 전 | 290 | ||
| 8171 | 9년 전 | 252 | ||
| 8170 | 9년 전 | 372 | ||
| 8169 |
커네드커네드
|
9년 전 | 323 | |
| 8168 | 9년 전 | 405 | ||
| 8167 | 9년 전 | 396 | ||
| 8166 | 9년 전 | 295 | ||
| 8165 | 9년 전 | 241 | ||
| 8164 | 9년 전 | 370 | ||
| 8163 | 9년 전 | 368 | ||
| 8162 | 9년 전 | 367 | ||
| 8161 | 9년 전 | 384 | ||
| 8160 |
|
9년 전 | 585 | |
| 8159 | 9년 전 | 527 | ||
| 8158 | 9년 전 | 330 | ||
| 8157 | 9년 전 | 441 | ||
| 8156 | 9년 전 | 329 | ||
| 8155 | 9년 전 | 323 | ||
| 8154 |
00년생용띠
|
9년 전 | 659 | |
| 8153 | 9년 전 | 302 | ||
| 8152 |
|
9년 전 | 482 | |
| 8151 | 9년 전 | 482 | ||
| 8150 | 9년 전 | 584 | ||
| 8149 |
Jangfolk
|
9년 전 | 443 | |
| 8148 | 9년 전 | 257 | ||
| 8147 | 9년 전 | 447 | ||
| 8146 | 9년 전 | 530 | ||
| 8145 | 9년 전 | 481 | ||
| 8144 | 9년 전 | 444 | ||
| 8143 | 9년 전 | 282 | ||
| 8142 | 9년 전 | 492 | ||
| 8141 | 9년 전 | 444 | ||
| 8140 | 9년 전 | 999 | ||
| 8139 | 9년 전 | 350 | ||
| 8138 |
전갈자리남자
|
9년 전 | 455 | |
| 8137 | 9년 전 | 496 | ||
| 8136 | 9년 전 | 816 | ||
| 8135 |
|
9년 전 | 859 | |
| 8134 |
PlayPixel
|
9년 전 | 599 | |
| 8133 |
|
9년 전 | 508 | |
| 8132 | 9년 전 | 544 | ||
| 8131 | 9년 전 | 902 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기