B
B
Breeze12018-12-28 12:51:02
JavaScript
Breeze1, 2018-12-28 12:51:02

AppendTo() on click?

Guys, there is a div with the drop class. By clicking on the menu items, it is this div that needs to be added to the next menu item, and removed from the previous one.

In fact, these are tabs, there is only one tab, and it is added and removed from the menu items by clicking. I hope I adequately explained)

https://codepen.io/brezze/pen/ZVXGVp

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-12-28
@Breeze1

$('ul').on('click', 'a', function() {
  $(this).after($('.drop'));
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question