Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Organizing Tag filters

    General Discussion
    2
    2
    15
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Domenic Driessen last edited by

      Re: Organizing tags in the Tag Filter

      Hey there, I've been playing around with a new Layout for my website. The Tag Filter should play a central role in navigating my portfolio page. There are certain categories you can access through the tag filter.

      I had the same issue as in the post linked before. The Tags would reorganize themselves when clicking a filter option. The active one is pushed to the top and the other ones are appended at the bottom again.
      I would like them to stay in place and – if possible – have them organized through checkboxes. You can see an example in the pictues appended. (the second one just for visualization of the checkboxes... these are actually just text blocks that do nothing)

      Bildschirmfoto 2023-03-08 um 15.39.19.png

      Bildschirmfoto 2023-03-08 um 15.39.41.png

      When loading the page all boxes should be checked... To achieve this I wrote this code:

      document.addEventListener('DOMContentLoaded', function() {
        var tagBubbles = document.querySelectorAll('.tag-bubble.lay-filter-visible');
        for (var i = 0; i < tagBubbles.length; i++) {
          tagBubbles[i].classList.add('lay-tag-active');
        }
      });
      

      But whenever I click on a project thumbnail, the page is reloaded and the code is reset...

      I managed to append checkboxes though javascript but they would disappear when I click a project tumbnail or a filter.
      wrote this code to troubleshoot and it would fire only once when first clicking a filter. It seems like everthing is reset somehow whenever an action fires??

          jQuery(document).on("click", ".tag-bubble", function(event) {
          	console.log("yay!");
          });
      

      Enabled Ajax compatibility mode but it doesn't make a difference.

      Maybe I'm having the wrong ideas on how to implement scripts in laytheme here, but maybe you have some ideas. :)

      1 Reply Last reply Reply Quote 0
      • arminunruh
        arminunruh Global Moderator last edited by

        hey so you dont want tags to re-order when clicking on them
        and you want all of them to be active at the same time in the beginning

        mmmh

        im not sure i can help you with this :/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Post a link to where the problem is
        I don't answer or check forum DMs, please just post on the forum.
        Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com

        Before you post:

        Use the Search Feature. Maybe there is already a solution to your issue.

        1. Update Lay Theme and all Lay Theme Addons
        2. Disable all Plugins
        3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
        4. Now see if your problem solved itself
        5. Go here, see if your problem is listed here:
        Troubleshooting

        When you post:
        1. Post a link to where the problem is
        2. If the problem is difficult to explain, post screenshots / link to a video to explain it

        Thanks!

        Online Users

        R

        Recent Topics

        • H

          sumbmenu on mobile device

        • Q

          backdrop blur on ios

        • While editing the carousel, the images are not displayed correctly

        • Sticky Footer now has Background

        laytheme.com