Do I need to somehow escape a space when using jquery to select with contains/find?
I am mocking this up so pardon the typos...
If I have a SELECT tag that has some options
I am trying to find the options in this select using jquery. but it appears that the "find" method or "contains" function fails when the value being passed to search for contains a space. For example:
The following returns a size of 2:
But this returns 0 whre I would expect 2 as well:
My guess is that this has something to do with the selector and it is looking for a child element with "B" or something but Im not really sure.
Was a bug in 1.2.6 version of jquery, workgin fine on 1.3.2...Sorry :)
以上就是jquery not selecting option tags when value contains space的详细内容，更多请关注web前端其它相关文章！