Skip to main content

Moving HTML Content On Page with jQuery

By March 5, 2016Blog, Javascript, jQuery
Allure Web Solutions Code Snippet
$('table:last-child tr').each(function() {
removeLink = $(this).find('a').detach(); // use detach() to "cut" the selected element
$(this).find('span').append(removeLink); // paste selected element
});

CodePen Example

In this example, I’m moving the first column links into the second column (after the text already in the second column) and replacing the link text with a smiley face.

allure

Author allure

More posts by allure

Leave a Reply

Designed by

best down free | web phu nu so | toc dep 2017