@tuanphan Hi Tuanphan,
I used the jQuery you shared above to reorder blocks on mobile for a 7.1 site I'm working on. It worked perfectly for the mobile layout! However, when I checked the desktop version after implementing the code, it messed up the order of blocks on desktop. I've removed the code so you can see what the site is supposed to look like. I want it to all stack on mobile in the order that it appears on desktop, but this is a bit more difficult to do since it's one long running section, due to the svg drawing.
Here is the code I used based on what you shared above:
<script>
jQuery(document).ready(function($){
if (jQuery(window).width() < 767) {
// Home
$('[id="block-yui_3_17_2_1_1616534876033_9539"]').insertBefore('[id="block-yui_3_17_2_1_1617244295632_10731"]');
$('[id="block-yui_3_17_2_1_1616535620182_17948"]').insertBefore('[id="block-yui_3_17_2_1_1616536459872_18127"]');
$('[id="block-yui_3_17_2_1_1618934611350_9751"]').insertBefore('[id="block-yui_3_17_2_1_1616536459872_18127"]');
}
});
</script>
Here is the site I'm working on: https://drc.squarespace.com/home
Any suggestions?
Thank you!