0

I would like to ask how can I swap two divs vice versa without using a child selector? Since the two divs are in different parents.

<div class="ws_getprice_from">
   My content 1
</div>
<div class="ws_getprice_to">
   My content 2
</div>

<button class="from-to__flip">Flip</button>

$(document).ready(function() {
    $('.from-to__flip').click(function() {
        
    });
});

Sample: https://markuphero.com/share/U6nitwFOqeGZGOEq5Ojw

vvvvv
  • 25,404
  • 19
  • 49
  • 81

0 Answers0