jQuery FileTree 檔案樹形列表外掛程式

來源:互聯網
上載者:User

 

調用:  

$(j對象).fileTree(options,function(rel){.....});

 選項 : 

root - 顯示的根目錄; default = /

script - 預設的源檔案(此檔案被POST載入,參數為dir); default = jqueryFileTree.php

folderEvent - 展開合閉時預設的事件(單擊); default = click

expandSpeed - default = 500 (ms); 展開速度 -1 無動畫

collapseSpeed - default = 500 (ms); 合閉速度 -1 無動畫

expandEasing - 展開easing動畫

collapseEasing - 閉合easing動畫

multiFolder - 是否允許同時展開多個分支 default=true

loadMessage - 載入時的預設資訊 default=Loading...

回調:

function(rel){...} - 單擊項目時執行的代碼,rel為該項目的值,文本型

樣本$(document).ready( function() {
    $('#container_id').fileTree({
      root: '/some/folder/',
      script: 'jqueryFileTree.asp',
      expandSpeed: 1000,
      collapseSpeed: 1000,
      multiFolder: false
    }, function(file) {  //單擊檔案時執行的內容
        alert(file); 
    });
}); 後台返回什嗎?<ul class="jqueryFileTree" style="display: none;">
    <li class="directory collapsed"><a href="#" rel="/this/folder/">Folder Name</a></li>
    (additional folders here)
    <li class="file ext_txt"><a href="#" rel="/this/folder/filename.txt">filename.txt</a></li>
    (additional files here)
</ul> 示範 下載

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.