I am trying to concatenate var
value between two strings to get my code work, but I'm getting error of unexpected token or invalid string while trying different ways: to concatenate using concat
function or with dot between string.
Below the code:
var hash = window.location.hash;
var href = 'a[href="'.concat(hash) '"]';
alert(href);
if(hash != "") {
jQuery(".tab-content-panel").hide();
var id = jQuery(hash).show();
jQuery('.tabs-custom-nav li a').removeClass('current');
//jQuery('.tabs-custom-nav li a[href="'.hash "]').addClass('current');
//alert(id);
}
//alert(hash);