Skip to:
Content
Pages
Categories
Search
Top
Bottom

Toggle Forums

  • Hi,

    I’m adding a toggle switch on categories for my forum, but they need to each have unique ids or something along those lines in order for the toggle to talk to each individual category.

    Any ideas how I could do this? Here is the code I have for the toggle.

    <script>

    $(“.toggle”).click(function () {

    $(“#box”).slideToggle(“slow”);

    });

    </script>

Viewing 15 replies - 1 through 15 (of 15 total)

  • chrishajer
    Participant

    @chrishajer

    On which page were you going to add the toggle? Just the front page? Can you post a link to your forum?

    Hi,

    the forums are in development at the moment here –> http://forums.paperviewmagazine.com/

    I’m using a quick theme for the time being. But basically where the grey bars are for the categories e.g. CMS, Web, Client Side I’m wanting to add some + and – icons which will open and close those sections.


    chrishajer
    Participant

    @chrishajer

    Something like I did here then?

    http://www.lawserver.com/forums/

    See the forums and categories at the bottom.


    driz
    Member

    @driz

    Yes, but something more like this: http://www.neowin.net/forum/


    chrishajer
    Participant

    @chrishajer

    Ok, they’re using prototype and the toggle function. That’s what you would need to use to get that look.

    http://ajax.googleapis.com/ajax/libs/prototype/1.6/prototype.js

    The element you would target is already there in the output, .bb-category.


    driz
    Member

    @driz

    But there are more than one .bb-category on the page. How do I add the icon for each category and make it relative to that category.


    driz
    Member

    @driz

    Any updates on this pal? I’ve copied the code you use on your website to test, but the icon appears on all forums and not just the category ones (I noticed this is also the case on your forums)


    chrishajer
    Participant

    @chrishajer

    In that forum I linked to, it appears for all top level categories AND forums. It probably should not apply to top level forums. There’s really no reason for the icon there.

    It doesn’t appear on any of the other forums though. Is it for you?


    driz
    Member

    @driz

    It appears for all top level forums. but it should only appear for parent forums right? Not just categories but forums that have children too BUT NOT forums that are just single.


    chrishajer
    Participant

    @chrishajer

    Right.


    driz
    Member

    @driz

    But that’s not the case with your code though.


    chrishajer
    Participant

    @chrishajer

    Right. The code can be improved. Please feel free to do so on your site. The owner of this site is not worried about it right now. There’s always room for improvement. Sometimes you need to just call it good and move forward.


    Wex
    Member

    @wex

    They are using IPBv3. http://invisionpower.com/


    driz
    Member

    @driz

    Yes I know what software they are using (I have used it in the past) What I’m looking for is a simple way to add similar functionality to bbPress. I like the solution proposed by chrishajer but it has flaws.


    Alex-Special-k
    Member

    @alex-special-k

    Guys how to make such menu? You Can explain to me?

    I will be very grateful to you! =)

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.