XF 2.2 Can "Click to Expand" be Used Elsewhere?

Digital Jedi

Well-known member
Just wondering if it were possible to use either the javascript that functionalizes "Click to Expand" or otherwise use it in another template. I have a widget I'd like to apply the ability to. At the moment I'm going to just use some javascript I picked up elsewhere. But it would be nice to keep it internal.
 
This is the standard markup for an expandable quote box.

HTML:
<xf:css src="bb_code.less" />

<blockquote class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
    <div class="bbCodeBlock-content">
        <div class="bbCodeBlock-expandContent js-expandContent">
            <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. In volutpat pellentesque augue,
                tincidunt bibendum eros pretium id. Nullam luctus euismod semper. Etiam luctus nisl vitae est
                fermentum, in finibus lectus convallis. Phasellus condimentum neque ligula. Ut quis libero orci.
                Etiam dictum tristique neque, nec euismod lectus maximus in. Suspendisse lacinia auctor ex quis
                suscipit. Maecenas eu tellus vel lorem suscipit finibus. Suspendisse vel venenatis velit, at
                consectetur massa.
            </p>
        </div>
        <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">{{ phrase('click_to_expand') }}</a></div>
    </div>
</blockquote>

That would work in an HTML widget.
 
Back
Top Bottom