当前位置: 代码迷 >> Web前端 >> Jquery dialog 拖动 旋钮失效
  详细解决方案

Jquery dialog 拖动 旋钮失效

热度:733   发布时间:2012-11-23 00:03:43.0
Jquery dialog 拖动 按钮失效

		self.uiDialog.draggable({
			cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
			handle: '.ui-dialog-titlebar',
			containment: 'document',
			start: function(event, ui) {
				if(window.navigator.userAgent.indexOf("MSIE")<1)  //2012-4-23 mod
				{
					heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
					$(this).height($(this).height()).addClass("ui-dialog-dragging");
				}
				
				self._trigger('dragStart', event, filteredUi(ui));
			},
			drag: function(event, ui) {
				self._trigger('drag', event, filteredUi(ui));
			},
			stop: function(event, ui) {
				options.position = [ui.position.left - doc.scrollLeft(),
					ui.position.top - doc.scrollTop()];
				if(window.navigator.userAgent.indexOf("MSIE")<1)  //2012-4-23 mod
				{
					$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
				}
				
				self._trigger('dragStop', event, filteredUi(ui));
				$.ui.dialog.overlay.resize();
			}
		});




另附提高Jquery 性能的参考WebSite:
http://www.gbin1.com/technology/jquery/20120222jqueryxingneng/index.html
  相关解决方案