Highlight current link when loading to a DIV using loadContent.
Currently using jQuery's
- function loadContent(elementSelector, sourceURL) {
$(""+elementSelector+"").load(""+sourceURL+"");
}
and
- href="javascript:loadContent('#content', 'page/home.html');"
to load some remote content into the main container. The problems is: i'm unable to find any working solution to highlight the current, active menu item (build as an <ul> and styled with external css), considering the main page isn't reloading - especially when i'm in no way able to understand JS at all...
Would any of you have any idea how to mark the current menu item marked as active untill another one is chosen - and then repeat the function?