'); $('#a').wr...">All geek questions in one placeWhy can't I access my jQuery collection after it was used to wrap another item?Look at this code ...var b = $('<div id="b" />'); $('#a').wrap(b); b.css({ border: '5px solid red' }); jsFiddle .An item stored in bwill not have a border.Is there a way to access bagain when it was used to transfer another item?Or do I need again b = $('#b')?Thank.+3jqueryalex Feb 08 '11 at 2:24source share3 answersI don't think jQuery actually uses the same instance of "b" to wrap it. You will need to overwrite "b" with the one that was created for the transfer.var b = $('<div id="b" />'); b = $('#a').wrap(b).parent(); b.css({ border: '5px solid red' }); , , a ID, , .a.b, .+4RightSaidFred 08 . '11 2:35var b = $('');$('# a'). wrap (b).css({border: '5px '});+1AlexC 08 . '11 2:31B contains an element in memory, after adding the DOM, you send b to the DOM in the second line and before calling css () the element referred to by "b", and not with the DOM matching.+1Gustavo costa de oliveira Feb 08 '11 at 2:36source shareSource: https://habr.com/ru/post/1790602/More articles:How to get metadata from an image file in Android - androidSpring Web Stream 2: the problem of saving multiple models with one view - spring-webflowTraceability requirements in TDD? - tddWhat database should I use to store a large number of potentially large nested hash structures? - databaseHow do you pass the Lua function to the C function and execute the Lua function several times? - functionSlow AD Property Search in C # - c #требуется решение на основе python для веб-отображения табличных данных - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1790605/rails-is-there-a-way-to-get-rails-to-render-a-style-css-file-inside-of-the-view&usg=ALkJrhi66Q-cUES3vdV6SKzGO9qE8Ja22gРегулярное выражение Python с текстом wiki - pythonDelete the current row in sqlite3, iterating over the result set - cAll Articles
Look at this code ...
var b = $('<div id="b" />'); $('#a').wrap(b); b.css({ border: '5px solid red' });
jsFiddle .
An item stored in bwill not have a border.
b
Is there a way to access bagain when it was used to transfer another item?
Or do I need again b = $('#b')?
b = $('#b')
Thank.
I don't think jQuery actually uses the same instance of "b" to wrap it. You will need to overwrite "b" with the one that was created for the transfer.
var b = $('<div id="b" />'); b = $('#a').wrap(b).parent(); b.css({ border: '5px solid red' });
, , a ID, , .a.
a
.a
b, .
var b = $('');$('# a'). wrap (b).css({border: '5px '});
var b = $('');
$('# a'). wrap (b).css({border: '5px '});
B contains an element in memory, after adding the DOM, you send b to the DOM in the second line and before calling css () the element referred to by "b", and not with the DOM matching.
Source: https://habr.com/ru/post/1790602/More articles:How to get metadata from an image file in Android - androidSpring Web Stream 2: the problem of saving multiple models with one view - spring-webflowTraceability requirements in TDD? - tddWhat database should I use to store a large number of potentially large nested hash structures? - databaseHow do you pass the Lua function to the C function and execute the Lua function several times? - functionSlow AD Property Search in C # - c #требуется решение на основе python для веб-отображения табличных данных - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1790605/rails-is-there-a-way-to-get-rails-to-render-a-style-css-file-inside-of-the-view&usg=ALkJrhi66Q-cUES3vdV6SKzGO9qE8Ja22gРегулярное выражение Python с текстом wiki - pythonDelete the current row in sqlite3, iterating over the result set - cAll Articles