Hi Suchith,
Thanks for posting the code. With Lithium, it is the best practice to put that code is a custom component if you haven't already and wrap it in the @liaAddScript directive.
Your code won't work on those links because they aren't created before the page has finished loading. You will need to add this "click" event to dynamically added "a.lia-link-navigation" as well. I don't have working code for this currently. However, it would be something like below.
<@liaAddScript>
;(function($){
$(document).on('click', 'a.lia-link-navigation', function(event){
event.preventDefault();
console.log("This worked!");
window.open($(this).attr('href'), '_blank');
});
})(LITHIUM.jQuery);
</@liaAddScript>
Quoted from the directive document:
"Lithium loads a set of jQuery libraries that we use in the Community with core Lithium features. Using the Lithium JQuery libraries improves performance because you avoid adding the jQuery twice (which will increase page load time)."
"If you attempt to use LITHIUM.jQuery outside of the liaAddScript directive, you run the risk of a "jQuery is undefined" or similar errors because your JavaScript is likely being added before jQuery has been loaded."