How can I change a favicon using jQuery when it doesn't have an ID? I tried to add an ID, but I just can't seem to find it. I've been trying to get the right path in the Console without success. This is what I have tried: jQuery(:contains("shortcut icon")).attr("id", "favicon")
I figure these are the steps, but I haven't been able to get past the first one:
ACCESS LOCATION OF FAVICON VIA jQUERY: STUCK. Here's the HTML:
<link href='/favicon.png' rel='shortcut icon' />
ADD AN ID TO THE FAVICON:
$('element').attr('id', 'favicon');
USING THE ID, CHANGE FAVICON:
$('#favicon').attr('href','https://aerohive.com/sites/all/themes/aerohivenetworks/favicon.ico');
This is the page: http://community.aerohive.com/aerohive