You have to escape special characters with a double backslash:

$('#\\/about\\/')

On Feb 2, 4:35 am, starmonkey <scott.macl...@gmail.com> wrote:
> Using jQuery 1.2.6, it would seem that any id containing a forward
> slash cannot be selected using jQuery's syntax:
>
> <div id="blah">testing blah</div>
> <div id="/about/">testing about</div>
> <div id="/about2">testing about2</div>
> <div id="about3/">testing about3</div>
>
> $('#/about/') <- jQuery obj with length=0 returned
> $('#/about2') <- jQuery obj with length=0 returned
> $('#about3/') <- jQuery obj with length=0 returned
> $('#blah') <- works
>
> Just wondering if this is a bug, or me using a html id attribute in a
> manner not allowed?
>
> cheers,
> SM

Reply via email to