Skip to content

jQuery prettyPhoto 개발이야기

facebook.jpg

http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/


이미지 리스트업 시 썸네일 이미지를 바로 확대 시켜서 보여줄 때 유용한 jQuery용 라이브러리입니다.

다양한 image viewer(slideshow gallery) plugin 들이 존재하는데  prettyPhoto 사용하기 쉽고 해서 좋습니다.



Javascript coding 예제
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
    $(".gallery a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
});
</script>


Php내에서 html code로 image 표시
                             if($rs){
                                while(!$rs->EOF){
                                    $img_src = "";
                                    $img_content = "";
                                    if($rs->fields["attach_file_subpath"] == null){
                                        $img_content = "";
                                    } else {
                                        $img_src = "http://127.0.0.1/mmsmo/".$rs->fields["attach_file_subpath"].$rs->fields["attach_file_name"];
                                        $img_content = "<ul class=\"gallery clearfix\"><li><a href=\".$img_src."\" rel=\"prettyPhoto\" title=\"&lt;a href=&#x27;http://www.google.ca&#x27; target=&#x27;_blank&#x27; &gt;&lt;/a&gt;\"><img src=\".$img_src."\" width=56 height=56></a></li></ul>";
                                        
                                    }
                                ?>
                                
                                    <tr height=56>
                                        <td align="center"><?=$img_content?></td>
                                    </tr>
                                    <? 
                                    $rs->MoveNext();
                                }
                            }?>






Share
이 글과 관련된 글
  1. [2011/12/16] Mac에서 바탕화면 이미지 위치 찾는 팁 by Creativity, Safety, and Life (1636)
  2. [2011/11/04] 디스크 유틸리티와 터미널로 Mac에서 ISO 이미지 만들기 by Creativity, Safety, and Life (4338)
  3. [2011/10/23] jquery로 ajax호출시 로딩이미지 보여주기 by 날파리 (1129)
  4. [2011/10/05] How to fix the problem 'iPhone won't save pictures' (아이폰 사진 저장 에러 해결 방법) by Creativity, Safety, and Life (1864)
  5. [2011/07/24] 10 Free Online Image Editing Tools by Creativity, Safety, and Life (2213)
Tag :

Leave Comments

T-NAVI