所以我有一些jQuery的在這裏工作:http://jsfiddle.net/8VtZf/在jQuery中克隆時處理格式化空間的最佳方法是什麼?
這是怎麼看的開始......有(1)和(2),當我點擊添加按鈕,它將克隆最後一個,並增加數字。這一切都工作正常,信息開始爲:
<div class="inputClones">
<input class="inputButton" type="button" name="result[]" value="1" />
<input class="inputButton" type="button" name="result[]" value="2" />
</div>
當我單擊克隆按鈕時出現問題。克隆會發生的元件,但它不會保留格式...與結果代碼如下:
<div class="inputClones">
<input class="inputButton" type="button" name="result[]" value="1" />
<input class="inputButton" type="button" name="result[]" value="2" /><input class="inputButton" type="button" name="result[]" value="3" /><input class="inputButton" type="button" name="result[]" value="4" />
</div>
正因爲如此,之間的間距inherint(1)和(2),將在添加的克隆之間丟失。什麼是最好的方式來添加這個額外的間距?
顯示UD你的CSS –
你應該使用CSS這一點。不同的瀏覽器有不同的內置樣式表。 – BenM
沒有CSS –