Line 112: | Line 112: | ||
var urlMatch = url.match(reg); | var urlMatch = url.match(reg); | ||
var hrefMatch = this.href.match(reg); | var hrefMatch = this.href.match(reg); | ||
− | |||
if(hrefMatch){ | if(hrefMatch){ | ||
if(urlMatch){ | if(urlMatch){ | ||
if(urlMatch[0]==hrefMatch[0]||"Tartu_TUIT/Model"==hrefMatch[0]){ | if(urlMatch[0]==hrefMatch[0]||"Tartu_TUIT/Model"==hrefMatch[0]){ | ||
$(this).closest("div").addClass("main-menu-item-active"); | $(this).closest("div").addClass("main-menu-item-active"); | ||
+ | } | ||
+ | if(urlMatch[0]=="Tartu_TUIT/Model"){ | ||
+ | if(hrefMatch[0]=="Tartu_TUIT/Model"){ | ||
+ | $(this).closest("div").addClass("main-menu-item-active"); | ||
+ | } | ||
} | } | ||
} | } |
Revision as of 23:46, 30 October 2017