Parabellum1905y / ufd

Automatically exported from code.google.com/p/ufd
GNU General Public License v2.0
0 stars 0 forks source link

Support extensing <select> elements with id that contains '.' #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

<select id="a.b.c.d"><option value="1">1</option>..</select>
<script lang="text/javascript"> jQuery("#a\.b\.c\.d").ufd(); </script>

Original issue reported on code.google.com by Eugene.P...@gmail.com on 13 Sep 2010 at 9:56

GoogleCodeExporter commented 8 years ago
What is the problem with this?  Can you give some hint as to what fails ?

Original comment by thetoolman on 16 Sep 2010 at 11:11

GoogleCodeExporter commented 8 years ago
I suspect your problem is that you are not correctly escaping the dots in your 
selector:  

jQuery("#a\.b\.c\.d").ufd();

should be 

jQuery("#a\\.b\\.c\\.d").ufd();

Original comment by thetoolman on 16 Sep 2010 at 11:14

GoogleCodeExporter commented 8 years ago

Original comment by thetoolman on 16 Sep 2010 at 11:15

GoogleCodeExporter commented 8 years ago
"If you wish to use any of the meta-characters (#;&,.+*~':"!^$[]()=>|/@ ) as a 
literal part of a name, you must escape the character with two backslashes: \\. 
"

http://api.jquery.com/category/selectors/

Original comment by thetoolman on 16 Sep 2010 at 11:15

GoogleCodeExporter commented 8 years ago
Ok, I'll check it once more. 
I believe it failed to extend a select element with name containing dots.

Original comment by Eugene.P...@gmail.com on 17 Sep 2010 at 7:22

GoogleCodeExporter commented 8 years ago
It does nothing for jQuery("#a\\.b\\.c\\.d").ufd(); 
Sorry, that was a misspring in the example

Original comment by Eugene.P...@gmail.com on 17 Sep 2010 at 7:40