1. 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?

Discussion in 'XenForo Development Discussions' started by Marcus, Oct 30, 2013.

  1. Marcus

    Marcus Well-Known Member

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

    <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
    huncsi mobilium turba Quiritium
    certat tergeminis tollere honoribus
    illumsi proprio condidit horreo
    quicquid de Libycis uerritur areis
    Is there also a xenforo class that is always "display:none"?
  2. Chris D

    Chris D XenForo Developer Staff Member

    I think you're after:


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

    Line 4091 of xenforo.js starting: XenForo.ToggleTrigger
    Marcus likes this.
  3. Marcus

    Marcus Well-Known Member

    Wonderful, Thank you for taking the time to find me the right function.
  4. Chris D

    Chris D XenForo Developer Staff Member

    Didn't take me long. I only used it at the weekend ;)
    Marcus likes this.

Share This Page