i have a html table with 10 column (i.e 1 2 3 4 5 6 7 8 9 10 ) and i want to flip columns hortizontally (i.e 10 9 8 7 6 5 4 3 2 1 ) using Jquery...
i have below code for this but this code is very long can anyone provide short code for this..
$(function() {
jQuery.each($("table tr"), function() {
$(this).children(":eq(9)").after($(this).children(":eq(0)"));
$(this).children(":eq(8)").after($(this).children(":eq(0)"));
$(this).children(":eq(7)").after($(this).children(":eq(0)"));
$(this).children(":eq(6)").after($(this).children(":eq(0)"));
$(this).children(":eq(5)").after($(this).children(":eq(0)"));
$(this).children(":eq(4)").after($(this).children(":eq(0)"));
$(this).children(":eq(3)").after($(this).children(":eq(0)"));
$(this).children(":eq(2)").after($(this).children(":eq(0)"));
$(this).children(":eq(1)").after($(this).children(":eq(0)"));
});
});