Quote:
Originally Posted by noypiscripter
If the discus code is inserted after the jQuery include, you can also use:
Code:
$('link[rel="canonical"]').attr('href')
|
Thanks Glenn. The code is in an ad module for easy usergroup administration without writing custom templates. This is the Jquery code I had come up with originally. I battled this one because the code is before jquery loads. I'm not very proficient with pure JS so I have to hit places like Stack Exchange for answers to get it done. I didn't particularly like the looping, but this one was taking way too much time and there aren't that many link tags to cause a severe performance hit, so I rolled with it.