李炎恢_PHP_jQuery EasyUI[003] ~ 使用JS指定HTML標籤(Tag)變成EasyUI(拖拉)元件(屬性/事件 設定)
李炎恢_PHP_jQuery EasyUI[003] ~ 使用JS指定HTML標籤(Tag)變成EasyUI(拖拉)元件(屬性/事件 設定)
	
參考資料: https://github.com/jash-git/jash-WebSI
GITHUB: https://github.com/jash-git/richie_jQuery_EasyUI
	
My code:
$(function () {
	$.fn.draggable.defaults.cursor = 'text';
	$('#box').draggable({
		//revert : true,
		//cursor : 'text',
		//handle : '#pox',
		//disabled : true,
		//edge : 180,
		//axis : 'v',
		//proxy : 'clone',
		//deltaX : 50,
		//deltaY : 50,
		//proxy : function (source) {
		//	var p = $('<div style="width:400px;height:200px;border:1px dashed #ccc">');
		//	p.html($(source).html()).appendTo('body');
		//	return p;
		//}
		
		//onBeforeDrag : function (e) {
		//	alert('拖动前触发!');
		//},
		//onBeforeDrag : function (e) {
		//	return false;
		//},
		//onStartDrag : function (e) {
		//	//alert('拖动开始触发!');
		//	console.log($('#box').draggable('proxy'));
		//},
		//onDrag : function (e) {
		//	alert('拖动过程触发!');
		//},
		//onStopDrag : function (e) {
		//	alert('拖动结束后触发!');
		//},
		
		
		
	});
	
	
	//$('#box').draggable('disable');
	
	//$('#box').draggable('enable');
	
	
	//console.log($('#box').draggable('options'));
	
	
});
<!DOCTYPE html> <html> <head> <title>jQuery Easy UI</title> <meta charset="UTF-8" /> <script type="text/javascript" src="../../easyui_15/jquery.min.js"></script> <script type="text/javascript" src="../../easyui_15/jquery.easyui.min.js"></script> <script type="text/javascript" src="../../easyui_15/locale/easyui-lang-zh_TW.js" ></script> <script type="text/javascript" src="js/index.js"></script> <link rel="stylesheet" type="text/css" href="../../easyui_15/themes/default/easyui.css" /> <link rel="stylesheet" type="text/css" href="../../easyui_15/themes/icon.css" /> </head> <body> <div id="box" style="width:400px;height:200px;background:orange;"> <span id="pox">内容部分</span> </div> </body> </html>
	
PDF:
	
執行結果:
	
	
One thought on “李炎恢_PHP_jQuery EasyUI[003] ~ 使用JS指定HTML標籤(Tag)變成EasyUI(拖拉)元件(屬性/事件 設定)”
EASYUI主函數(程式進入點)