I have a with two cells that I want to display horizontally if device is computer or vertically if it\'s mobile. I borrowed a JS function to detect mo
-
2021-01-24 19:48
If you want to do only on initial load
function isMobile() {
return true; // or false
}
$(function () {
if (isMobile()) {
$td = $('#tbl').find('#row1_item2').detach();
$a = $('#row1').after(`
`);
$('#row2').append($td);
}
$('#row1_item2').css('display', 'table-row');
})