• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Javascript Toggle Function from Xenforo available?

Marcus

Well-known member
#1
Is there a build-in function like this, that removes the Show Content link and displays the content??

PHP:
<div class="Toggler" data-target="#hiddenContent">Show Content</div>

<div id="hiddenContent" style="display:none">
Maecenas atauis edite regibus,
o et praesidium et dulce decus meum,
sunt quos curriculo puluerem Olympicum
collegisse iuuat metaque feruidis
euitata rotis palmaque nobilis 5
terrarum dominos euehit ad deos;
hunc, si mobilium turba Quiritium
certat tergeminis tollere honoribus;
illum, si proprio condidit horreo
quicquid de Libycis uerritur areis.
</div>
Is there also a xenforo class that is always "display:none"?
 

Chris D

XenForo developer
Staff member
#2
I think you're after:

ToggleTrigger

You can pass a data-toggle-class to it, that class could show/hide the link.

Line 4091 of xenforo.js starting: XenForo.ToggleTrigger