开发者

Escaping a CSS selector

开发者 https://www.devze.com 2023-03-31 06:55 出处:网络
I\'ve escaped a CSS selector like so: $(\'#a\\\\[b\\\\]-c\') The [ and ] aren\'t valid characters, so I escaped them with 2 slashes. Seems to work just fine, but one of my clients is reporting that

I've escaped a CSS selector like so:

$('#a\\[b\\]-c')

The [ and ] aren't valid characters, so I escaped them with 2 slashes. Seems to work just fine, but one of my clients is reporting that something isn't working on that page in IE7, and I can't reproduce it.

Is this escaping handled by jQuery in开发者_运维问答ternally, or does it delegate it back to the browser, and maybe their version of the browser isn't handling it correctly?

That's all I can think of....everything else looks fine.

Can't show source unfortunately.

0

精彩评论

暂无评论...
验证码 换一张
取 消