Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将同一类“td.top”的所有元素附加到另一个地方,但我不知道这怎么可能。欢迎任何想法,我有点卡住了。谢谢对于任何输入。这是我现在的代码:
$(document).ready(function() { if ( $(window).width() < 960) { $("td.top").appendTo("ul.sub"); } else { //something else } });
怎么样:
$("td.top").not(":last").appendTo("ul.sub");