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 });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8030 | 9년 전 | 417 | ||
| 8029 | 9년 전 | 340 | ||
| 8028 | 9년 전 | 296 | ||
| 8027 | 9년 전 | 310 | ||
| 8026 | 9년 전 | 382 | ||
| 8025 | 9년 전 | 410 | ||
| 8024 | 9년 전 | 400 | ||
| 8023 | 9년 전 | 424 | ||
| 8022 | 9년 전 | 340 | ||
| 8021 | 9년 전 | 362 | ||
| 8020 | 9년 전 | 367 | ||
| 8019 | 9년 전 | 380 | ||
| 8018 | 9년 전 | 481 | ||
| 8017 | 9년 전 | 562 | ||
| 8016 | 9년 전 | 388 | ||
| 8015 | 9년 전 | 419 | ||
| 8014 | 9년 전 | 347 | ||
| 8013 | 9년 전 | 270 | ||
| 8012 | 9년 전 | 270 | ||
| 8011 | 9년 전 | 479 | ||
| 8010 | 9년 전 | 333 | ||
| 8009 | 9년 전 | 349 | ||
| 8008 | 9년 전 | 320 | ||
| 8007 | 9년 전 | 466 | ||
| 8006 | 9년 전 | 503 | ||
| 8005 |
|
9년 전 | 998 | |
| 8004 | 9년 전 | 387 | ||
| 8003 | 9년 전 | 457 | ||
| 8002 | 9년 전 | 351 | ||
| 8001 |
|
9년 전 | 695 | |
| 8000 | 9년 전 | 458 | ||
| 7999 | 9년 전 | 408 | ||
| 7998 | 9년 전 | 467 | ||
| 7997 | 9년 전 | 338 | ||
| 7996 | 9년 전 | 566 | ||
| 7995 | 9년 전 | 518 | ||
| 7994 | 9년 전 | 403 | ||
| 7993 | 9년 전 | 476 | ||
| 7992 | 9년 전 | 545 | ||
| 7991 | 9년 전 | 292 | ||
| 7990 | 9년 전 | 327 | ||
| 7989 | 9년 전 | 332 | ||
| 7988 | 9년 전 | 761 | ||
| 7987 | 9년 전 | 464 | ||
| 7986 | 9년 전 | 466 | ||
| 7985 | 9년 전 | 545 | ||
| 7984 | 9년 전 | 463 | ||
| 7983 | 9년 전 | 699 | ||
| 7982 | 9년 전 | 559 | ||
| 7981 | 9년 전 | 517 | ||
| 7980 | 9년 전 | 539 | ||
| 7979 | 9년 전 | 528 | ||
| 7978 | 9년 전 | 491 | ||
| 7977 | 9년 전 | 433 | ||
| 7976 | 9년 전 | 893 | ||
| 7975 | 9년 전 | 407 | ||
| 7974 | 9년 전 | 452 | ||
| 7973 | 9년 전 | 632 | ||
| 7972 | 9년 전 | 425 | ||
| 7971 | 9년 전 | 499 | ||
| 7970 | 9년 전 | 343 | ||
| 7969 | 9년 전 | 583 | ||
| 7968 | 9년 전 | 430 | ||
| 7967 | 9년 전 | 413 | ||
| 7966 | 9년 전 | 418 | ||
| 7965 |
|
9년 전 | 1046 | |
| 7964 | 9년 전 | 437 | ||
| 7963 | 9년 전 | 446 | ||
| 7962 | 9년 전 | 445 | ||
| 7961 |
전갈자리남자
|
9년 전 | 540 | |
| 7960 | 9년 전 | 1008 | ||
| 7959 | 9년 전 | 586 | ||
| 7958 | 9년 전 | 436 | ||
| 7957 | 9년 전 | 394 | ||
| 7956 | 9년 전 | 391 | ||
| 7955 | 9년 전 | 497 | ||
| 7954 | 9년 전 | 432 | ||
| 7953 | 9년 전 | 481 | ||
| 7952 | 9년 전 | 402 | ||
| 7951 | 9년 전 | 532 | ||
| 7950 | 9년 전 | 430 | ||
| 7949 | 9년 전 | 422 | ||
| 7948 | 9년 전 | 357 | ||
| 7947 | 9년 전 | 975 | ||
| 7946 | 9년 전 | 492 | ||
| 7945 | 9년 전 | 434 | ||
| 7944 | 9년 전 | 496 | ||
| 7943 | 9년 전 | 427 | ||
| 7942 | 9년 전 | 441 | ||
| 7941 | 9년 전 | 430 | ||
| 7940 | 9년 전 | 930 | ||
| 7939 | 9년 전 | 423 | ||
| 7938 | 9년 전 | 439 | ||
| 7937 | 9년 전 | 328 | ||
| 7936 | 9년 전 | 911 | ||
| 7935 | 9년 전 | 517 | ||
| 7934 | 9년 전 | 502 | ||
| 7933 | 9년 전 | 625 | ||
| 7932 | 9년 전 | 563 | ||
| 7931 | 9년 전 | 623 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기