English 中文(简体)
替代所有人吗?
原标题:Alternative to jQuery replaceAll()?

我有一部法典,从一个充满活力的桌子上删除tr(每tr有独一无二的id:三):):

tri = $("#"+trid+"");
var newrow =  <tr id="newr"><td colspan="4" align="center"><div id="nrow"> </div></td></tr> ;
tri.after(newrow);
tri.detach();

然后,我用中文本超正文将表格放在零行。 第一次开工时,有一只 j子。

当表格被取消时,我把名单重新贴在:

setTimeout("tri.replaceAll( $( #newr ) )", 400);

This all works beautifully, except that it kills the jquery ui datepicker in the form if I try to edit that (or any) row after that. I ve trouble shot it down to being the replaceAll line. If I take that out and replace the list by building it again it works just fine (it s not the timeout either).

因此,在不使用替代物(替代工作)的情况下,是否还有另一种办法用碎块物体三取代tr新器?

EDIT:

因此,这就是我如何将表格从网页上其他地方的四点移走:

eP = $( #eP );
eP.replaceAll( $( #nrow ) );
$("#editPast").show( blind ,  ,500,  );

e P 含有隐藏的潜伏器......

然后,在取消职能时,我回过来:

setTimeout(function() {eP.appendTo($( #ePreplace )); }, 500);  (thanks adeneo!)

......

因此,我猜测我的问题是,电子邮局在被用在Nonrow(即html)之后,拖拉日期。


缩略语

。 Oops! 感谢让我重新思考这一看法,并附上<>just detach( comment!

最佳回答

缩略语

eP.appendTo to$ ( #eP ).append 这样,它就从占支配地位而不是原始变量中取而代之。 Oops! 感谢各位刚才发表评论,让我重新思考这个问题!

感谢纽福蒂德建议我也这样做。

问题回答

暂无回答




相关问题
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.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签