Nice trick.
On 6月13日, 上午9時36分, brian wrote:
> On Fri, Jun 12, 2009 at 2:37 PM, amuhlou wrote:
>
> > putting it all together, you'd get something like:
>
> > $('#div1').replaceWith($('#div2')).remove();
>
> > first you find div1, then replace it with div2, then remove div1
>
> There's no need for
On Fri, Jun 12, 2009 at 2:37 PM, amuhlou wrote:
>
> putting it all together, you'd get something like:
>
> $('#div1').replaceWith($('#div2')).remove();
>
> first you find div1, then replace it with div2, then remove div1
There's no need for remove() because it will have been replaced already.
putting it all together, you'd get something like:
$('#div1').replaceWith($('#div2')).remove();
first you find div1, then replace it with div2, then remove div1
On Jun 12, 2:12 pm, Kean wrote:
> W3C says that id should not start with a number
>
> Here's probably what you need.
>
> $('#1').rem
W3C says that id should not start with a number
Here's probably what you need.
$('#1').remove();
On Jun 11, 7:44 pm, "David .Wu" wrote:
> Can I remove div1 but div2 keep there?
>
>
>
>
On Thu, Jun 11, 2009 at 10:44 PM, David .Wu wrote:
>
> Can I remove div1 but div2 keep there?
>
>
>
>
Someone (Karl?) answered the same question recently. You just replace
the outer div with the inner.
Note that you can't have an element ID starting with a number, though.
Let's call them div_
i guess you just have to move div 2 somewhere else before you remove div 1
6 matches
Mail list logo