MyBB Community Forums

Full Version: Exp/Coll Image to FA Icon (Toggle State Not Remembering)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I changed the default image collapse to a font awesome icon. It works expanding and collapsing wise but it no longer remembers the toggle state upon refresh. Am I missing something here? Or do I need to edit the JS file for this (my JS knowledge is basically none lol)?

Original:
<img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" />

Modified:
<i id="cat_{$forum['fid']}_img" class="fa-solid fa-arrow-down-up-across-line expander" alt="{$expaltext}" title="{$expaltext}"></i>

(Can provide site link via DM's but not public, this is a client website that I am creating a theme for.)
just a thought, but maybe instead of defining inline icon as you currently are, just in case an alternate method currently may help you, have you tried say trying this method https://community.mybb.com/thread-233107...pid1377306 to see if such saves you headaches and time? While my reply there is specific to FA 5 I am sure you could easily modify for FA 6 usage else if not I could easily provide the same steps for FA 6 if requested since your examples denote that you are using FA 6. Best of luck.
Ah! I didn't even think about using CSS.

Thank you! I'll check that out.