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 });
});
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1730 | 17년 전 | 1182 | ||
| 1729 | 17년 전 | 1613 | ||
| 1728 | 17년 전 | 1680 | ||
| 1727 | 17년 전 | 1818 | ||
| 1726 | 17년 전 | 2955 | ||
| 1725 | 17년 전 | 2092 | ||
| 1724 |
|
17년 전 | 1772 | |
| 1723 |
끝없는사랑
|
17년 전 | 2113 | |
| 1722 |
끝없는사랑
|
17년 전 | 1822 | |
| 1721 | 17년 전 | 3349 | ||
| 1720 | 17년 전 | 1534 | ||
| 1719 | 17년 전 | 1650 | ||
| 1718 |
사랑합니다
|
17년 전 | 1368 | |
| 1717 | 17년 전 | 2189 | ||
| 1716 | 17년 전 | 3143 | ||
| 1715 |
|
17년 전 | 2280 | |
| 1714 |
|
17년 전 | 1735 | |
| 1713 | 17년 전 | 2993 | ||
| 1712 | 17년 전 | 4430 | ||
| 1711 | 17년 전 | 1740 | ||
| 1710 | 17년 전 | 3241 | ||
| 1709 |
jeans
|
17년 전 | 1567 | |
| 1708 |
|
17년 전 | 3476 | |
| 1707 | 17년 전 | 5842 | ||
| 1706 |
|
17년 전 | 1420 | |
| 1705 |
|
17년 전 | 2159 | |
| 1704 | 17년 전 | 1794 | ||
| 1703 |
심심맨닷컴
|
17년 전 | 1552 | |
| 1702 | 17년 전 | 2427 | ||
| 1701 |
|
17년 전 | 2630 | |
| 1700 | 17년 전 | 1600 | ||
| 1699 | 17년 전 | 2683 | ||
| 1698 |
RedRiverFisher
|
17년 전 | 3170 | |
| 1697 |
심심맨닷컴
|
17년 전 | 1528 | |
| 1696 |
eclub
|
17년 전 | 1940 | |
| 1695 | 17년 전 | 3850 | ||
| 1694 |
깜장고무신
|
17년 전 | 4480 | |
| 1693 |
stuartkim
|
17년 전 | 1883 | |
| 1692 |
stuartkim
|
17년 전 | 1751 | |
| 1691 |
|
17년 전 | 2680 | |
| 1690 | 17년 전 | 1846 | ||
| 1689 | 17년 전 | 3936 | ||
| 1688 | 17년 전 | 1656 | ||
| 1687 | 16년 전 | 1931 | ||
| 1686 |
|
17년 전 | 2261 | |
| 1685 | 17년 전 | 2110 | ||
| 1684 |
|
17년 전 | 3573 | |
| 1683 |
leeLook
|
17년 전 | 1594 | |
| 1682 | 17년 전 | 2656 | ||
| 1681 | 17년 전 | 1646 | ||
| 1680 | 17년 전 | 1910 | ||
| 1679 | 17년 전 | 7422 | ||
| 1678 | 17년 전 | 1996 | ||
| 1677 | 17년 전 | 4093 | ||
| 1676 | 17년 전 | 2417 | ||
| 1675 | 17년 전 | 2426 | ||
| 1674 | 17년 전 | 2151 | ||
| 1673 | 17년 전 | 2197 | ||
| 1672 | 17년 전 | 2626 | ||
| 1671 | 17년 전 | 3220 | ||
| 1670 | 17년 전 | 5331 | ||
| 1669 |
플래시007
|
17년 전 | 2785 | |
| 1668 |
|
17년 전 | 2698 | |
| 1667 | 17년 전 | 2552 | ||
| 1666 |
|
17년 전 | 1797 | |
| 1665 | 17년 전 | 2207 | ||
| 1664 | 17년 전 | 5308 | ||
| 1663 |
|
17년 전 | 3024 | |
| 1662 |
|
17년 전 | 2582 | |
| 1661 |
|
17년 전 | 3256 | |
| 1660 |
|
17년 전 | 2474 | |
| 1659 |
|
17년 전 | 2831 | |
| 1658 | 17년 전 | 5878 | ||
| 1657 | 17년 전 | 2635 | ||
| 1656 |
Piece
|
17년 전 | 2022 | |
| 1655 |
|
17년 전 | 2656 | |
| 1654 | 17년 전 | 1476 | ||
| 1653 | 17년 전 | 9800 | ||
| 1652 | 17년 전 | 4461 | ||
| 1651 | 17년 전 | 3290 | ||
| 1650 | 17년 전 | 1813 | ||
| 1649 | 17년 전 | 3603 | ||
| 1648 | 17년 전 | 2290 | ||
| 1647 | 17년 전 | 3737 | ||
| 1646 | 17년 전 | 5191 | ||
| 1645 | 18년 전 | 3846 | ||
| 1644 | 18년 전 | 2700 | ||
| 1643 | 18년 전 | 2947 | ||
| 1642 | 18년 전 | 2455 | ||
| 1641 | 18년 전 | 2794 | ||
| 1640 |
porgy
|
18년 전 | 1904 | |
| 1639 | 18년 전 | 3452 | ||
| 1638 |
컴퓨터기술자
|
18년 전 | 2143 | |
| 1637 |
|
18년 전 | 2262 | |
| 1636 | 18년 전 | 2074 | ||
| 1635 | 18년 전 | 3050 | ||
| 1634 |
귀여운현호
|
18년 전 | 2000 | |
| 1633 |
태양의서쪽
|
18년 전 | 2675 | |
| 1632 | 18년 전 | 3876 | ||
| 1631 | 18년 전 | 4570 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기