unrecognized expression: a [href = #!]

-1

In the URL, if I only leave dominio.com.br the site works normally, if I put dominio.com.br/# it still works too, but by putting dominio.com.br/#! the site returns me this error

  Uncaught Error: Syntax error, unrecognized expression: a [href = #!]

in the jQuery (1.9.0) file.

    
asked by anonymous 12.05.2014 / 22:10

1 answer

0
jQuery is trying to use the final portion of the URL as an ID in a query, but there is no element with that ID ("!") on the page, so jQuery throws the error. You have to make sure that the element EXISTS in the body of the page, and that it has a valid ID, which can be referenced in the URL.

    
14.05.2014 / 19:19