I am attempting to create a script that will allow certain td elements (but not all) in different tr elements to switch places with the ones directly above or below them. My goal is to only target the last 3 td elements in each row, rather than the entire row. I have been struggling to find a solution that will specifically target these 3 td elements without affecting the rest of the row.
You can view the example I have created here: http://codepen.io/anon/pen/qwHbz
I am aware that a simple solution like the following can swap entire rows:
$("#Row1").after($("#Row2"));
However, I am interested in targeting only the specific td elements within each row. For example, if I were to click .saTableDown on the first row that contains it, I would like the Target, Level, and Instruction td elements to swap with the ones below it, and so on. Is it possible to achieve this using jQuery or JavaScript? I have been unable to find a solution so far. Thank you for your help!