jQuery Easy UI Resizable(調整大小)組件

來源:互聯網
上載者:User

標籤:jquery   easyui   resizable   

Resizable(調整大小)組件,easyui基礎組件之一,調整大小就是可以對元素可以拖著調整大小,這個組件不依賴於其他組件,使用比較簡單,相關的屬性、事件都

在例子中介紹了。

樣本:

<!DOCTYPE html><html><head><title>jQuery Easy UI</title><meta charset="UTF-8" /><script type="text/javascript" src="easyui/jquery.min.js"></script><script type="text/javascript" src="easyui/jquery.easyui.min.js"></script><script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js" ></script><link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css" /><link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" /><script>$(function () {$.fn.resizable.defaults.disabled = true;$('#rr').resizable({disabled : false,  //設定為true的時候禁止調整handles : 'e,s,se',//聲明調整的方位:n:北  e:東  s:南  w:西 除此之外還有ne、se、sw、nw和all。minWidth : 200,//預設為10  調整大小的時候最小寬度minHeight : 200,//預設為10  調整maxWidth : 600,//預設為10000調整大小時預設最大寬度maxHeight: 400,//預設為10000調整大小時預設最大高度edge : 10,//預設5  邊框邊緣觸發大小(就是多大地區觸發可拖拽邊線)//通過瀏覽器控制台可以清晰的看到下面幾個事件的觸發時機以及觸發次數onStartResize : function (e) {console.log('開始調整的時候觸發!');},onResize : function (e) {console.log('調整期間的時候觸發!');//return false;},onStopResize : function (e) {console.log('停止調整的時候觸發!');},});console.log($('#rr').resizable('options'));//返回對象屬性$('#rr').resizable('disable');   //禁用調整功能$('#rr').resizable('enable');   //啟用調整功能});</script></head><body><div id="rr" style="width:100px;height:100px;border:1px solid black"></div></body></html>

點擊下載原始碼

jQuery Easy UI Resizable(調整大小)組件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.