jquery - href match with links -


I got this piece of code, but I want to fix it because if statement is true then it is empty Any ideas of ... how can I always lie it?

using! Inside if this is not working

  var $ link = $ (this) .attr ("href"); If ($ link.match (/ ^ (?:? * ??)? (Domain) \ net (?: \ /.)? $ /)) {} And {$ (this) .attr ("href ", 'Http: //links.domain.net/URL =' + $ link); }   

This function is in jquery

  / * change_links * / (function ($) {$ .fn.change_links = function () { $ ('A: not ([href = = mailto])'). Each (function () {var $ link = $ (this) .attr ("href"); if ($ link.match (/ ^ ( ?:. * ??)? (Tyrinkic) \ net (?: / /). $ /)) {} And {$ (this) .attr ("href", 'http: // links .taringacs .net /? Url = '+ $ link);}}})}}}) (jQuery);   

Thanks in advance

Use < Pre> / * change_links * / (function ($) {$ .fn.change_links = function () {$ ('a: not ([href = = mailto])'). Each (function () { Var $ link = $ (this) .attr ("href"); if (! / ((???:. * ????). (Taringacs) \ net (?: \ /.*)? $ /.test ($ Link) {$ (this) .attr ("href", 'http: //links.taringacs.net/ url =' + $ link);}}})}}}) (jQuery) ;

Comments