Im using angular and jquery to scroll to an element base on his location hash string. In my situation i need to include in the string the '?' char, but its seems like jquery has problem with this.
This is the link:
<a href="#/faq#whenAreLotteryResultsUpdatedOnTheSite?">when Are Lottery Results Updated OnThe Site </a>
This is the jquery code:
var elem = '#' + $location.hash();
console.log($(elem));
The error:
Error: Syntax error, unrecognized expression: #whenAreLotteryResultsUpdatedOnTheSite?
Any solution?
$()or something like that?