$('a[href*="#"]') in vanilla js code example
Example: javascript find link by href
//Selects all links with href='http://domain.com'
document.querySelectorAll("a[href='http://domain.com']");
//Selects all links with href='http://domain.com'
document.querySelectorAll("a[href='http://domain.com']");