English 中文(简体)
a. 部分自成不变
原标题:append element to last in its own div
  • 时间:2012-05-05 05:30:51
  •  标签:
  • jquery
  • html

我有10个编组,有<条码>pcre,有单项编目,有<条码>。 我怎么能够把干(行为类别=pcre)推到与 j(id=huge)的干iv中。

我曾尝试过

<div id="huge">
   <div class="pcre">a</div>
    <div class="pcre">b</div>
    <div class="pcre">c</div>
    <div class="pcre">d</div>
    <div class="pcre">e</div>
    <div class="pcre">f</div>
    <div class="pcre">g</div>
    <div class="pcre">h</div>
    <div class="pcre">i</div>
    <div class="pcre">j</div>
    </div>
<script>
  $(".pcre").click(function() {
       $(this).appendTo("#huge");$(this).remove(); 
  });
</script>

www.un.org/spanish/ecosoc 但它没有工作。

最佳回答

你在担任职务之前有额外礼让,你也不需要搬走。

<div id="huge">
   <div class="pcre">a</div>
    <div class="pcre">b</div>
    <div class="pcre">c</div>
    <div class="pcre">d</div>
    <div class="pcre">e</div>
    <div class="pcre">f</div>
    <div class="pcre">g</div>
    <div class="pcre">h</div>
    <div class="pcre">i</div>
    <div class="pcre">j</div>
    </div>
<script>
$(".pcre").click(function(){
$(this).appendTo("#huge"); 
 });</script>​
问题回答

Hiya demo http://jsfiddle.net/TPHy8/4/ or http://jsfiddle.net/TPHy8/6/

页: 1 ! B- 任何hoo和切除均可被拆除。

希望这一帮助! 请允许我知道,我是没有其他东西了!

<<>条码>

<>>>>

$(".pcre").click(function(){
$(this).appendTo("#huge");
   // $(this).remove(); 
 });​

$(".pcre").click(function(){
$(this).appendTo("#huge");
    $(this).remove(); 
 });​




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签