시작페이지로 즐겨찾기추가
로그인
회원가입 l 출석체크 l 마이페이지 l CGIMALL
happycgi
자료실 사이트등록 랭킹100 프로그램리뷰 관리자추천자료 초보가이드
커뮤니티
전체 펼쳐보기
퀵메뉴링크 jquery , CSS , PHP , Javascript , 무료폰트 , ASP
상세검색
 > JAVASCRIPT > javascript 소스창고 > 이미지관련 > Floating Gallery with Drag&Drop 상세정보
사이트등록
클라우드태그
Javascript
PHP
CSS
HTML
asp
API
jquery
mysql
image
Mobile
slide
게시판
메뉴
현재접속자 90 새로고침
Floating Gallery with Drag&Drop
소스통계정보 오류신고 및 문의
해피팀
네티즌
트위터로 보내기 페이스북으로 보내기 네이버로공유
소스분류 이미지관련
다운로드 횟수 962 회
간단설명 Floating Image Gallery 이미지를 선택과 동시에 마우스로 드래그하여 위치를 변경할 수 있습니다.
평가하기 훌륭함 매우좋음 좋음 괜찮음 보통 별로
홈페이지바로가기 소스다운로드 데모 미리보기 스크랩하기

<HEAD>태그안에 아래의 스크립트를 넣습니다.

썸네일 이미지를 다음과 같은 형식으로 HTML 코드에 삽입합니다.

<BODY>태그안에 아래의 스크립트를 넣으세요.

갤러리에 이미지 추가하기

The images used in the gallery are inserted by using just plain HTML. The syntax you have to use is like this:
<div class="imageBox" id="imageBox1">
     <div class="imageBox_theImage" style="background-image:url('example_images/image1.jpg')"></div>
     <div class="imageBox_label"><span>Image number 1</span></div>
</div>

The values that will change for each image are

  • The ID of the first div("imageBox1"), which should be unique for each of the images in the gallery.
  • The background image of the second div. This will be the path to the image you want to show
  • The text between the <span> tags of the third div("Image number 1"). This will be the title of your image

Download images

다운받은 자료에서 이미지들을 "images" 폴더안에 넣으세요.

How to save changes

After someone have rearranged the images, you might want to give them the option to save their changes. This can be done by working a little bit with a function called saveImageOrder().

What this function does is to create a comma separated list of images IDs based on how the images are currently ordered. Example : "1,3,4,9,6". One suggestion on how the to save these changes is to have a hidden frame and post form data there. I.e.:

  1. Create a hidden frame(example: <IFRAME src="whereToSubmit.html" name="myIframe" frameborder="no" height="1" width="1">)
  2. Create a form where target is set to this iframe(<FORM name="myForm" action="whereToSubmit.html" target="myIframe" method="post">)
  3. Create a hidden form field where we store the commaseparated list of image-ids: (<INPUT type="hidden" name="imageIdList">)
  4. In the saveImageOrder function, update the hidden form field with the commaseparated list of image ids: document.myForm.imageIdList.value = orderString)
  5. At last, submit the form: document.myForm.submit()

Now, the order of the images is submitted to the "whereToSubmit.html" file. There, you will typically explode the string into an array of pieces and then update your database

In case you don't want drag & drop

If you only want to display the images and don't want any drag & drop support, you can simply remove the entire <SCRIPT>...</SCRIPT> part.

 


네티즌 의견   이용하신 자료의 후기를 자유롭게 작성하세요. (상업적인 광고 및 도배성 글 등은 사전통보없이 삭제될 수 있습니다.)
내용 아이디 의견남기기
등록된 의견이 없습니다.
1
이름
내용
:네맞아요: :화나는군요: :잠와: :우울해: :이건아냐: :왕하하: 왕웃음~ 놀램~
평가하기 훌륭함 매우좋음 좋음 괜찮음 보통 별로
도배방지키
 74612636 보이는 도배방지키를 입력하세요.