Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Custom CSS by categories

Custom CSS by categories

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • S
    S
    sjg123
    wrote on last edited by sjg123
    #1

    Hello,

    I am trying to create a filter effect on a thumbnail grid.

    I have 3 categories on my menu, let's say A, B and C. Each page is a thumbnail grid showing every project thumbnails. But I want that when I click on A, projects thumbnails from categories B and C change opacity.

    I managed to target the page already with:

    .slug-A .thumb {opacity: 0.5;}
    

    Now, every thumbnail changed. But when I target the category:

    .slug-A [data-id=“4”][data-type="category"] .thumb {opacity: 0.5;}
    

    It doesn't work anymore.

    I hope I am clear enough. Does anyone know what I am doing wrong? Thanks!

    1 Reply Last reply
    0
    • mariusjopenM
      mariusjopenM
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Hi sjg123,

      without seeing the actual site it is a bit difficult to imagine.

      For me this sounds more like you need a bit of jQuery to solve this problem. I am not sure if you can do this with pure CSS.

      Let me know how things are going!

      All the best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • S
        S
        sjg123
        wrote on last edited by sjg123
        #3

        Hello @mariusjopen ,

        Thanks a lot for your reply. Unfortunately I am working offline for now, so it is not possible to show you the website. But you can see an exemple of what I am trying to achieve here.

        I made a thumbnail grid with all my categories and I am tryting to target the different categories separately, in order to change their opacity.

        I don't know much about jQuery yet, so I will have to look more into it then...

        Thanks!

        1 Reply Last reply
        0
        • mariusjopenM
          mariusjopenM
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          Hi sjg123!

          This looks indeed like you need to use jQuery.

          It will not be that difficult.

          You just need to get the class of the category you click on. And then find all the other elements with the same class and give them a class called active.

          Roughly like that.

          Good luck with this!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          Online Users
          Z
          zachludlow
          A
          Anna_S
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search