简体   繁体   中英

Select DIV in jQuery


I have two divs with ID #container.

In first one is class .current-content
[div#container -- div.current-content]

The second one is contained in class .next-content and contain class current-content
[div#container -- div.next-content -- div#container -- div.current-content]

Is possible to have only one #container with class .current-content with elements from second .current-content ?
Eventually how do that?
Thanks. :)

Each id value must be used only once within a document. If more than one element has been assigned the same ID, queries that use that ID will only select the first matched element in the DOM. This behavior should not be relied on, however; a document with more than one element using the same ID is invalid.

from http://api.jquery.com/id-selector/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM