How to press the button again to cancel the action or add a function that will return these items back to their places? Actually the transfer of elements occurs when you click to swap places on this site serjo96.imtqy.com/matrix
$(document).on("click",".change-mtrx", function(){ $('.matrix_a').appendTo('.matrix_b_cover'); $(".matrix_b").appendTo(".matrix_a_cover"); });
.matrix_a,.matrix_b,.matrix_b_cover,.matrix_a_coverand where they should return - Grundy