I’m using the current jQuery:
$(function() {
$('span .breadcrumb').each(function(){
$('#nav').addClass($(this).text());
$('#container').addClass($(this).text());
$('.stretch_footer').addClass($(this).text())
$('#footer').addClass($(this).text());
});
});
It applies the text held in the breadcrumb to 4 elements on the page, allowing me to style specifically to the page there on.
I’d like to try adding an ID instead of a class, how can I achieve this?
Try this:
So it becomes;
So you are changing/overwriting the id of three elements and adding an id to one element.
You can modify as per you needs…