Skip Navigation

[Cerrado] Styling the current list item with css

This support ticket is created hace 10 años, 10 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 5 respuestas, has 2 mensajes.

Last updated by Mario hace 10 años, 10 meses.

Assigned support staff: Mario.

Autor
Mensajes
#8101

I have a view with an unordered list that I'm using in a sidebar. How would I change the color of a Selected list item with css?

#8115

Hi Brent,

What is the item you name a selected? Like the active page, i.e. when you are viewing an entry which is a part of the View?

I don't think we have this in Views yet.

Mario

#8118

This is what I have in a view,
[wpv-layout-start]
<!-- wpv-loop-start -->

    <wpv-loop>

  • [wpv-post-link]
  • </wpv-loop>

<!-- wpv-loop-end -->
[wpv-no-posts-found][wpml-string context="wpv-views"]No posts found[/wpml-string][/wpv-no-posts-found]
[wpv-layout-end]

So I need the current selected title within this list to change color. If that makes since. I'm using the view widget to pull in the view within the sidebar.

#8164

Hi Brent,

This is not possible with CSS, you have to use some JavaScript to trigger this behavior. We don't set automatically classes for active menus. You need to wrap the loop in a div with some ID and then use a JS snippet in your theme similar to this one: http://stackoverflow.com/questions/2521028/jquery-menu-active-link

Best,
Mario

#8168

Ah yes, I'll try it out, thanks for the help on this. I thought maybe it would work like wordpress does with the default .current-item class for menus. Thanks

#8169

It has some extra logic out there for the menus being a very large menu-oriented module so that's the reason they have extra classes for that.

Best,
Mario

El debate ‘[Cerrado] Styling the current list item with css’ está cerrado y no admite más respuestas.