chore(i8n,learn): processed translations
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
15047f2d90
commit
e5c44a3ae5
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bad87fee1348bd9aed508826
|
||||
title: 使用 jQuery 克隆元素
|
||||
title: Clone an Element Using jQuery
|
||||
challengeType: 6
|
||||
forumTopicId: 16780
|
||||
dashedName: clone-an-element-using-jquery
|
||||
@@ -8,33 +8,33 @@ dashedName: clone-an-element-using-jquery
|
||||
|
||||
# --description--
|
||||
|
||||
除了移动标签,也可以把元素从一个地方复制到另一地方。
|
||||
In addition to moving elements, you can also copy them from one place to another.
|
||||
|
||||
jQuery 有一个`clone()`方法,可以复制标签。
|
||||
jQuery has a function called `clone()` that makes a copy of an element.
|
||||
|
||||
例如,如果想把`target2`从`left-well`复制到`right-well`,可以设置如下:
|
||||
For example, if we wanted to copy `target2` from our `left-well` to our `right-well`, we would use:
|
||||
|
||||
`$("#target2").clone().appendTo("#right-well");`
|
||||
|
||||
你是否注意到这两个 jQuery 方法连在一起了吗?这被称为`链式调用(function chaining)`,是一种用 jQuery 实现效果的简便方法。
|
||||
Did you notice this involves sticking two jQuery functions together? This is called <dfn>function chaining</dfn> and it's a convenient way to get things done with jQuery.
|
||||
|
||||
克隆`target5`标签并附加到`left-well`。
|
||||
Clone your `target5` element and append it to your `left-well`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`target5`标签应该在`right-well`内。
|
||||
Your `target5` element should be inside your `right-well`.
|
||||
|
||||
```js
|
||||
assert($('#right-well').children('#target5').length > 0);
|
||||
```
|
||||
|
||||
克隆`target5`标签并放在`left-well`内。
|
||||
A copy of your `target5` element should also be inside your `left-well`.
|
||||
|
||||
```js
|
||||
assert($('#left-well').children('#target5').length > 0);
|
||||
```
|
||||
|
||||
仅用 jQuery 移动这些标签。
|
||||
You should only use jQuery to move these elements.
|
||||
|
||||
```js
|
||||
assert(!code.match(/class.*animated/g));
|
||||
|
||||
Reference in New Issue
Block a user