English 中文(简体)
• 如何从方案角度启动可回收的溶解性?
原标题:How to trigger jquery Resizable resize programmatically?

我有一小 element子,可以拆解。 它还恢复了备选办法,因此其他要素同时转而使用。

∗∗∗∗∗∗∗∗

我如何能够做到这一点?

最佳回答

<>Update: 从我解答此事,使事件不再奏效以来,法国认为,“ j”的内部情况发生了巨大变化。

不再发生火灾,因为可再生的原始物已发生根本变化。 /em>,而不是在末上合成物品。 它聆听了内部的<代码>resize 传播关于可再生原始物质的活动_mouseDrag-handler发射。 但是,它取决于沿途形成的变量,因此,即便是在内部赢得帮助的只是开枪。

这意味着,即便如此,这充其量也不过是微不足道的。 d 我仅建议人工改写<代码>,并直接执行各项内容,如果可能,则完全不考虑统一分类。

但是,要说的是.。 问题在于,金刚石的内部结构确定了与以往和现在的土地使用状况相关的各种财产,以便了解有多少资产可以转作。 我们可以<>使用<> 采用这种方法增加植被的方法,例如:

$.widget("ui.resizable", $.ui.resizable, {
    resizeTo: function(newSize) {
        var start = new $.Event("mousedown", { pageX: 0, pageY: 0 });
        this._mouseStart(start);
        this.axis =  se ;
        var end = new $.Event("mouseup", {
            pageX: newSize.width - this.originalSize.width,
            pageY: newSize.height - this.originalSize.height
        });
        this._mouseDrag(end);
        this._mouseStop(end);
    }
});

这只是制造了“可使用<>条码/代码”的烟花,植被正在寻找和发射。 如果你想做像<条码>这样的事情的话。 resizeBy 这甚至更简单,因为我们所关心的是三角洲:

var end = $.Event("mouseup", { pageX: newSize.width, pageY: newSize.height });

http://www.wdget(t), 摘自“Query UI”,在创建“.resizable() 例之前,并且所有数字均采用resize To方法。 这一部分没有变化,只是:

$(".selector").resizable({ alsoResize: ".other-selector" });

然后,请大家转播新的<代码>。 To 类似方法:

$(".selector").resizable("resizeTo", { height: 100, width: 200 });

如果你立即将其拖到这个规模上的话,那么情况就是这样。 当然,这里有几条 go:

  • The "se" axis is assuming you want resize by the bottom right - I picked this because it s by far the most common scenario, but you could just make it a parameter.
  • We re hooking into the internal events a bit, but I m intentionally using as few internal implementation details as possible, so that this is less likely to break in the future.
  • It could absolutely break in future versions of jQuery UI, I ve only tried to minimize the chances of that.

可在以下几个方面采取行动:resizeBy,载于


www.un.org/Depts/DGACM/index_spanish.htm

你可以这样做:

$(".selector").trigger("resize");

www.un.org/Depts/DGACM/index_french.htm

问题回答

你们能够以方案方式激发这些障碍。 例如,触发东西方转水活动:

var elem =... // Your ui-resizable element
var eastbar = elem.find(".ui-resizable-handle.ui-resizable-e").first();
var pageX = eastbar.offset().left;
var pageY = eastbar.offset().top;

(eastbar.trigger("mouseover")
        .trigger({ type: "mousedown", which: 1, pageX: pageX, pageY: pageY })
        .trigger({ type: "mousemove", which: 1, pageX: pageX - 1, pageY: pageY })
        .trigger({ type: "mousemove", which: 1, pageX: pageX, pageY: pageY })
        .trigger({ type: "mouseup", which: 1, pageX: pageX, pageY: pageY }));

I am doing a 1px left followed by 1px right movement on the east bar handle. To perform a full size, you can target .ui-resizable-handle.ui-resizable-se if you have east and south resize bars.

我需要同样的检验。 https://stackoverflow.com/a/17099382/1235394”https://stackoverflow.com/a/170982/1235394,但需要额外安排,因此我以自己的解决办法结束发言。

我有一个具有可伸张右边的内容。

$nameHeader.resizable({handles:  e , ... });

而且在测试期间,我需要引发所有挫折,以便适当调整所有要素。 测试守则的关键部分:

var $nameHeader = $list.find( .list-header .name ),
    $nameCell = $list.find( .list-body .name );
ok($nameHeader.hasClass( ui-resizable ),  Name header should be resizable );
equal($nameCell.outerWidth(), 300,  Initial width of Name column );

// retrieve instance of resizable widget
var instance = $nameHeader.data( ui-resizable ),
    position = $nameHeader.position(),
    width = $nameHeader.outerWidth();
ok(instance,  Instance of resizable widget should exist );

// mouseover initializes instance.axis to  e 
instance._handles.trigger( mouseover );
// start dragging, fires `start` callback
instance._mouseStart({pageX: position.left + width, pageY: position.top});
// drag 50px to the right, fires `resize` callback
instance._mouseDrag({pageX: position.left + width + 50, pageY: position.top});
// stop dragging, fires `stop` callback
instance._mouseStop({pageX: position.left + width + 50, pageY: position.top});

// ensure width of linked element is changed after resizing
equal($nameCell.outerWidth(), 350,  Name column width should change );

当然,这部法典是很困难的,在植被改变时可能会中断。

www.un.org/Depts/DGACM/index_spanish.htm Hack Dis claimer (tested on jQuery 1.12.4):

这基本上等待方言的开张,然后通过<代码>1px(迫使resize(<>>/code>)和随后通过<代码>1px加以修改。 (重获<条码>原始尺寸

方言: open 活动手稿:

 $(this)
.dialog("option","width",$(this).dialog("option","width")+1)
.dialog("option","width",$(this).dialog("option","width")-1);

<><>>> 表示:

这可能不会产生显示效应(如fadeIn,slideDown<>/code>等),因为“resizer”代码在方言全部发表之前就已执行。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...