Suppose we have these text/images.
On mobile, you want to move image to this position
#1. Edit Image > Add this word into ALT
mobileimg
#2. Edit Text > Add this hyperlink after text.
mobiletext
Make sure “Open in New Tab” is disabled.
we will have this
#3. Use this code to Custom CSS box to make “mobile-text” invisible
a[href="#mobile-text"] { display: none; }
#4. Use this code to Code Injection > Footer (or Page Header Injection) to move image to desired position.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> jQuery(document).ready(function($) { function run() { if ($(window).width() <= 767) { $('div.image-block [alt*="mobileimg"]').insertAfter('div.html-block:has(a[href="#mobile-text"])'); } else { } } run(); window.addEventListener('resize', run) }); </script>
#5. Result