How can a div
be declared to use as a template (without a function)?
div = $('<div class="not"></div>'); a = div.addClass('x'); b = div.addClass('y'); c = div.addClass('z'); alert(div.attr('Class')); // <-- Чтобы у div остался только класс "not"
'); a = div.addCla...">
How can a div
be declared to use as a template (without a function)?
div = $('<div class="not"></div>'); a = div.addClass('x'); b = div.addClass('y'); c = div.addClass('z'); alert(div.attr('Class')); // <-- Чтобы у div остался только класс "not"
Source: https://ru.stackoverflow.com/questions/410377/
All Articles
function div() {return $('<div></div>');} div().addClass('x');
I don’t know right now, profes will cast aside shit and give me the status of google coder! [Alt text] [1] [1]: vk.com/images/emoji_2x/D83DDCA9.png - user27286