Working fine in desktop, expanding automatically on mobile
-
Hi there.
First of all – absolutely love your product. Had tested a bunch of alternatives and kept running into problems!
I had to implement the collapse function via javascript instead of shortcode, and it works fine when it’s at the top of my pages, but I wrote some conditional code to move the copy to the bottom of the page for mobile and it loads auto-expanded there.
This is the code I’m using to trigger the function on my store & category pages:
<div id=”my_id” class=”collapseomatic” title=”Trigger Text”>Keep reading…</div>
<div id=”target-my_id” class=”collapseomatic_content”>
</div>
The best way to show you an example is on a particular store page
If you load the page on desktop, the collapse code works fine (you can see it at the top of the page), but now if you load the same page in mobile (break point ~420px) you’ll see that it’s fully expanded. The collapse function is definitely there because I can click on “keep reading” and it shuts it, but it’s expanded by default which looks sloppy.
I’d rather not go in and touch each store and category page individually (that’s where the description text lives). Is there something that I can tweak in the plugin files or my template to make it work the same for both desktop and mobile? The description code is nested in a table and also within a div that is set to only show at 420px (ie anything above that is set to display:none), but there aren’t any other tweaks that I’ve made.
Please let me know if there are other details which I can provide!
Thanks,
Antonella
- The topic ‘Working fine in desktop, expanding automatically on mobile’ is closed to new replies.