$ (a) .each (function (index, item) {var url = $ (this) .attr ("href"); if (url.indexOf ("/ visit /")! == - 1) {$ ( bu) .attr ("rel", "nofollow");}});