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 });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2230 | 16년 전 | 1290 | ||
| 2229 | 16년 전 | 2161 | ||
| 2228 | 16년 전 | 3224 | ||
| 2227 | 16년 전 | 2166 | ||
| 2226 | 16년 전 | 1752 | ||
| 2225 | 16년 전 | 1512 | ||
| 2224 |
|
16년 전 | 2045 | |
| 2223 | 16년 전 | 4730 | ||
| 2222 | 16년 전 | 1410 | ||
| 2221 |
|
16년 전 | 2146 | |
| 2220 |
|
16년 전 | 2135 | |
| 2219 |
|
16년 전 | 2406 | |
| 2218 |
|
16년 전 | 2145 | |
| 2217 |
|
16년 전 | 4440 | |
| 2216 |
|
16년 전 | 2927 | |
| 2215 | 16년 전 | 2866 | ||
| 2214 | 16년 전 | 1602 | ||
| 2213 | 16년 전 | 1250 | ||
| 2212 |
|
16년 전 | 3948 | |
| 2211 |
|
16년 전 | 1620 | |
| 2210 |
|
16년 전 | 1617 | |
| 2209 | 16년 전 | 2114 | ||
| 2208 | 16년 전 | 1886 | ||
| 2207 |
letsgolee
|
16년 전 | 1491 | |
| 2206 |
|
16년 전 | 3920 | |
| 2205 | 16년 전 | 1759 | ||
| 2204 | 16년 전 | 3136 | ||
| 2203 | 16년 전 | 3022 | ||
| 2202 | 16년 전 | 1047 | ||
| 2201 | 16년 전 | 1844 | ||
| 2200 | 16년 전 | 1594 | ||
| 2199 |
|
16년 전 | 1854 | |
| 2198 |
태양의서쪽
|
16년 전 | 2643 | |
| 2197 |
태양의서쪽
|
16년 전 | 3025 | |
| 2196 |
태양의서쪽
|
16년 전 | 3227 | |
| 2195 | 16년 전 | 3328 | ||
| 2194 | 16년 전 | 1465 | ||
| 2193 |
letsgolee
|
16년 전 | 1423 | |
| 2192 | 16년 전 | 2258 | ||
| 2191 | 16년 전 | 1976 | ||
| 2190 |
|
17년 전 | 2290 | |
| 2189 | 17년 전 | 2810 | ||
| 2188 |
Sizkein
|
17년 전 | 3261 | |
| 2187 |
letsgolee
|
17년 전 | 2357 | |
| 2186 |
Sizkein
|
17년 전 | 1635 | |
| 2185 |
Sizkein
|
17년 전 | 3208 | |
| 2184 |
Sizkein
|
17년 전 | 3062 | |
| 2183 | 17년 전 | 3041 | ||
| 2182 | 17년 전 | 3918 | ||
| 2181 | 17년 전 | 2584 | ||
| 2180 |
|
17년 전 | 2406 | |
| 2179 | 17년 전 | 2654 | ||
| 2178 | 17년 전 | 2898 | ||
| 2177 | 17년 전 | 2615 | ||
| 2176 | 17년 전 | 1453 | ||
| 2175 | 17년 전 | 1897 | ||
| 2174 | 17년 전 | 1495 | ||
| 2173 |
|
17년 전 | 1923 | |
| 2172 | 17년 전 | 2523 | ||
| 2171 | 17년 전 | 8708 | ||
| 2170 | 17년 전 | 3158 | ||
| 2169 | 17년 전 | 4249 | ||
| 2168 |
|
17년 전 | 1987 | |
| 2167 | 17년 전 | 3658 | ||
| 2166 |
|
17년 전 | 1552 | |
| 2165 | 17년 전 | 1386 | ||
| 2164 | 17년 전 | 2324 | ||
| 2163 | 17년 전 | 1316 | ||
| 2162 | 17년 전 | 1641 | ||
| 2161 | 17년 전 | 1459 | ||
| 2160 | 17년 전 | 2530 | ||
| 2159 |
inxps
|
17년 전 | 1499 | |
| 2158 |
inxps
|
17년 전 | 1093 | |
| 2157 | 17년 전 | 1225 | ||
| 2156 | 17년 전 | 3104 | ||
| 2155 | 17년 전 | 2173 | ||
| 2154 | 17년 전 | 1976 | ||
| 2153 |
|
17년 전 | 1222 | |
| 2152 |
letsgolee
|
17년 전 | 2455 | |
| 2151 | 17년 전 | 1170 | ||
| 2150 |
아름다운세상
|
17년 전 | 1130 | |
| 2149 |
아름다운세상
|
17년 전 | 1377 | |
| 2148 |
아름다운세상
|
17년 전 | 2737 | |
| 2147 |
|
17년 전 | 2399 | |
| 2146 | 17년 전 | 2483 | ||
| 2145 | 17년 전 | 1186 | ||
| 2144 | 17년 전 | 1302 | ||
| 2143 | 17년 전 | 3248 | ||
| 2142 | 17년 전 | 2836 | ||
| 2141 | 17년 전 | 4109 | ||
| 2140 | 17년 전 | 2260 | ||
| 2139 | 17년 전 | 2349 | ||
| 2138 | 17년 전 | 1399 | ||
| 2137 | 17년 전 | 2515 | ||
| 2136 | 17년 전 | 2200 | ||
| 2135 | 17년 전 | 2961 | ||
| 2134 |
아름다운세상
|
17년 전 | 2469 | |
| 2133 |
Juinjang
|
17년 전 | 1630 | |
| 2132 | 17년 전 | 2431 | ||
| 2131 | 17년 전 | 1589 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기