0

I am using this: https://github.com/flesler/jquery.scrollTo

And every browser works but Firefox, specifically when my anchors contain spaces in them. I found many threads about it not working in Firefox in general, but not specifically when it is about white spaces.

  • [Why would your anchor contain space in the first place](http://stackoverflow.com/questions/497908/are-urls-allowed-to-have-a-space-in-them)? – Vucko Aug 20 '14 at 10:06
  • Any attribute containing spaces is pretty much a bad idea when it comes to HTML, with the exception of classes where whitespace denotes separate class names. If you REALLY want spaces in the anchors, I suggest you modify the URL with `%20` as the space character inside `scrollTo()` – Jason Aug 20 '14 at 10:09

1 Answers1

0

Try using the Attribute Contains Prefix Selector like this:

$(window).scrollTo($("[id|='y o u r I D']"))
Trotpof
  • 116
  • 3