2013-03-17 4 views
3

웹 사이트에서 파일을 업로드하기 위해 jQuery 함수를 구현하려고합니다. 스크립트는 'plupload'를 사용합니다.jQuery가 함수에서 전달되지 않습니다.

불행히도 백그라운드에서 실행되는 다른 jQuery 기능이 있습니다.

<script type="text/javascript"> 
    jQuery(function ($) { 
     $.supersized({ 
      // Functionality 
      slide_interval: ss_interval, // Length between transitions 
      transition: 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left or ss_transitionType 
      transition_speed: ss_transitionSpeed, // Speed of transition 
      // Slides 
      slides: [ // Slideshow Images 
      { 
       image: 'images/gallery/1.jpg', 
       title: 'Upload and share your music with other...', 
       title2: 'Music' 
      }, { 
       image: 'images/gallery/2.jpg', 
       title: 'Share your work online and access your documents from anywhere. ', 
       title2: 'Documents' 
      }, { 
       image: 'images/gallery/3.jpg', 
       title: 'Show off your favorite photos and videos to the world.', 
       title2: 'Photography' 
      }, { 
       image: 'images/gallery/4.jpg', 
       title: 'Let the world watch your videos, or share them privately.', 
       title2: 'Video' 
      }, { 
       image: 'images/gallery/8.jpg', 
       title: 'Free file storage service. Share files with your friends.', 
       title2: 'Upload and Share' 
      }] 
     }); 
     $("#uploader").plupload({ 
      // General settings 
      runtimes: 'flash,html5,browserplus,silverlight,gears,html4', 
      url: 'upload.php', 
      max_file_size: '1000mb', 
      max_file_count: 20, // user can add no more then 20 files at a time 
      chunk_size: '1mb', 
      unique_names: true, 
      multiple_queues: true, 
      // Resize images on clientside if we can 
      resize: { 
       width: 320, 
       height: 240, 
       quality: 90 
      }, 
      // Rename files by clicking on their titles 
      rename: true, 
      // Sort files 
      sortable: true, 
      // Specify what files to browse for 
      filters: [{ 
       title: "Image files", 
       extensions: "jpg,gif,png" 
      }, { 
       title: "Zip files", 
       extensions: "zip,avi" 
      }], 
      // Flash settings 
      flash_swf_url: 'js/upload/plupload.flash.swf', 
      // Silverlight settings 
      silverlight_xap_url: 'js/upload/plupload.silverlight.xap' 
     }); 
     // Client side form validation 
     $('form').submit(function (e) { 
      var uploader = $('#uploader').plupload('getUploader'); 
      // Files in queue upload them first 
      if (uploader.files.length > 0) { 
       // When all files are uploaded submit form 
       uploader.bind('StateChanged', function() { 
        if (uploader.files.length === (uploader.total.uploaded + uploader.total.failed)) { 
         $('form')[0].submit(); 
        } 
       }); 
       uploader.start(); 
      } else alert('You must at least upload one file.'); 
      return false; 
     }); 
    }); 
</script> 

여기에 문제가 있습니다. 아무런 효과가 없으며 페이지가 아무 것도 반환하지 않습니다. 하지만이 부분 (아래 참조)을 삭제하면 업로드의 기능이 작동합니다.

$.supersized({ 
    // ... 
}); 

누군가가 도와 드릴 수 있습니까? 나는 콘솔에서 다음과 같은 오류를 받고 있어요 :

Uncaught TypeError: Object [object Object] has no method 'pajinate' jScript.js:134

Uncaught TypeError: Object function (a,b){return new d.fn.init(a,b,g)} has no method 'supersized' jquery.min.js:16

+2

당신은 .... 오류를 얻을 예 다음 여기에 게시하는 경우 ... 즉'$ .supersized 어떤 문제 – bipen

+1

을 알아낼 helptful 것 .... 콘솔을 확인 할 '? – Mathletics

+0

이것은 슬라이드 쇼입니다. http://buildinternet.com/project/supersized/slideshow/3.2/demo.html – tomprouvost

답변

0

를 플러그인 이러한 파일 중 하나가 누락처럼 js/supersized.3.2.6.min.jstheme/supersized.shutter.min.js이 ... 보이는이 플러그인과 관련된 두 가지 파일이 ..there 있습니다보기. jquery.js 다음에 <head>에로드하면 작동합니다.

+0

두 스크립트 모두 헤더에로드됩니다. 의심의 여지가 없습니다. 문제는 두 스크립트가 모두 같은 시간에로드 될 수 없다는 것입니다. – tomprouvost

+0

'로드 할 수 없습니다. 나는 당신이 그것을 하나씩 호출하면 일어나지 않아야한다고 생각합니다 ... . sorce를보고 링크를 클릭하십시오. .. u 파일의 내용을 보여 주어야합니다. .. 그냥 .. u가 준 경로가 정확합니다. – bipen

+0

나는 확인했습니다. 문제 없습니다. 그 증거는 만약 내가 supersized 부분을 삭제하면, 업로드 플러그인이 작동한다는 것입니다. – tomprouvost

0

여러분 모두에게 감사드립니다.

문제점은 2 버전의 jquery 로더가 있다는 것이 었습니다. 이전 버전을 삭제하면 작동합니다!

덕분에 모든

관련 문제