![]() |
<a href="XYZ"></a> append script help
Hi,
I have a script that is designed to append all the links on a page with the exstension '&layout=jp ' for the href. onload = function () { for (var i = 0; i < document.links.length; i++) document.links[i].href = document.links[i].href + '&layout=jp'} I would like to be able exclude certain links from this happening too, ideally through their css class/id ... but I am not sure where to start? Any help would be much appreciated. Best, P |
Welcome to the forums. Please be mindful to use the CODE tags and indent for readability when posting code.
What you can do is run through each link in the for loop and test for a class as you go, e.g. Code:
window.onload = function () { |
Thank you for your help BDL, much appreciated.
Best |
| All times are GMT +1. The time now is 08:00 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.