Bug Tracker

Modify

Ticket #9256 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

No option to prepend / append nested divs?

Reported by: dimitrivorontzov@… Owned by: dimitrivorontzov@…
Priority: low Milestone: 1.next
Component: manipulation Version: 1.5.2
Keywords: Cc:
Blocking: Blocked by:

Description

Hi jQuery team! Kudos for developing web's hottest library, and a question:

today I tried to prepend a div within a div. No luck. App[arently, jQuery doesn't allow to. do so.

Here's what I did:

.prepend('<div id="outer-div"><div id="inner-div"></div></div>')

Alas, only the outer div ended up prepended to the page.

Am I missing something or is jQuery currently lacking the ability to prepend nested elements? Wouldn't it be cool to have this?

Best regards,

Dimitri Vorontzov

Change History

comment:1 Changed 2 years ago by timmywil

  • Owner set to dimitrivorontzov@…
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to manipulation

I created a test case, but was unable to reproduce the issue. Please update the test case below or provide a new test case on  http://jsfiddle.net to help us assess your ticket.

 http://jsfiddle.net/timmywil/k88vR/

comment:2 Changed 2 years ago by anonymous

comment:3 Changed 2 years ago by dimitrivorontzov@…

  • Status changed from pending to new

Actually, correction, just to make it perfectly obvious:

 http://jsfiddle.net/k88vR/5/

Still no trace of that inner div though.

comment:4 Changed 2 years ago by dimitrivorontzov@…

Damn, I'm not functioning porperly today. Had to fix it one more time:

 http://jsfiddle.net/k88vR/6/

However, still nothing has changed: the inner div is invisible, even though having the z-index of 999 and the color red it should be there.

Am I missing anything still?

Dimitri

comment:5 Changed 2 years ago by dimitrivorontzov@…

 http://jsfiddle.net/k88vR/7/

OK, I think in this case I can safely say it was my error. However, in a practical situation I encountered today, I really didn't have anything visible in the inner div. Let me try to recreate that very situation and see what happens.

Give me a few mins.

comment:6 Changed 2 years ago by anonymous

Yep, I'm unable to recreate the issue, either. Now I know I must have made some kidn of coding mistake.

The issue is resolved for me, thank you.

No bug.

Best regards,

Dimitri Vorontzov

comment:7 Changed 2 years ago by timmywil

  • Status changed from new to closed
  • Resolution set to invalid

Thanks for looking into it.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.