Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add button item-header hidden/show


  • threwthenevr
    Participant

    @threwthenevr

    On the profile were you can add a cover image has a toggle on the right side that
    Triggers the `.buddypress div#item-header .toggle-header .bp-toggle-less,
    .buddypress div#item-header .toggle-header .bp-toggle-more`

    In the BuddyPress.css file.

    Im trying to add a new button to completely hide/show the entire item-header
    And I am stuck.
    I tried something like this and added it to my style.css but it’s now working.

    .buddypress div#item-header {
    <button onclick="myFunction()">expand</button>
    }
Viewing 1 replies (of 1 total)

  • threwthenevr
    Participant

    @threwthenevr

    This is how it’s done, I found a way

    <button onclick="myFunction()">Try it</button>
    <script>
    function myFunction() {
        var x = document.getElementById('item-header');
        if (x.style.display === 'none') {
            x.style.display = 'block';
        } else {
            x.style.display = 'none';
        }
    }
    </script>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar