Hi It seems that whenever I add a widget to the wordpress sidebar, it adds a number (of how many times this widget has been in the sidebar) to the ID. A bit hard to explain, but try this...
I have a calendar widget in the sidebar and it's ID is events-list-widget-1. If I remove the calendar widget and then add it again, it's now called events-list-widget-2.
Is there a way for me to select the events-list-widget regardless of the number? like events-list-widget-*
best regards and thanks for reading this far :-D MadsRH
You can do this by using a CSS attribute selector which won't work in IE8 and below but it's dead simple to write up some jQuery code for IE, see the examples below.
SgtLegend -> Exactly what I was looking for. However I can't get it working on my site. I think it has something to do with the ID being inside a class. This is the css for changing the background color:
I searched through your site and couldn't find the CSS but found the jQuery and an error i made with it, see the fixed jQuery code below. If you have or are using a cache like W3 cache make sure to clear it as the changes won't appear until then.
It seems that whenever I add a widget to the wordpress sidebar, it adds a number (of how many times this widget has been in the sidebar) to the ID. A bit hard to explain, but try this...
I have a calendar widget in the sidebar and it's ID is events-list-widget-1.
If I remove the calendar widget and then add it again, it's now called events-list-widget-2.
Is there a way for me to select the events-list-widget regardless of the number? like events-list-widget-*
best regards and thanks for reading this far :-D
MadsRH
See the below post
CSS
See the below post
jQuery for IE
I've added directly into the head now, but I still don't see the change reflected on the site.
Thanks you very very much for all your help. You've improved my site tremendously.
best regards
//MadsRH