Skip to main content

Bug Tracker

Side navigation

#11354 closed bug (worksforme)

Opened February 16, 2012 06:52AM UTC

Closed February 17, 2012 04:29PM UTC

Last modified February 18, 2012 05:20AM UTC

Jquery $.each not working for element have name with special characters

Reported by: dilipprasad87@gmail.com Owned by: dilipprasad87@gmail.com
Priority: low Milestone: None
Component: misc Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

Hello,

i have a web application where i am trying to iterate through list of Input elements of type Checkbox and Radio buttons

my radio button and checkbox have id and name attribute like this abc$master$uccontrl$tel

so when i iterate through these elements i am getting a exception from Jquery 1.7 stating unregocnized kind of Exception abc$master$uccontrl$tel

seems like its not able to handle elements with special characters ? is there a way to make this work via jquery itself ?

Attachments (0)
Change History (3)

Changed February 16, 2012 07:57AM UTC by sindresorhus comment:1

owner: → dilipprasad87@gmail.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

Changed February 17, 2012 04:29PM UTC by addyosmani comment:2

component: unfiledmisc
priority: undecidedlow
resolution: → worksforme
status: pendingclosed

I put together a test case iterating over a number of inputs of type checkbox using the same 'id' and 'name' naming schemes that you mentioned. You can see it here: http://jsfiddle.net/wxGMg/1/. This demonstrates both the indices, content and item manipulation being possible without any exceptions being incurred (I'm using 1.7.1 here, but this works fine.

Because I've also tried this out using actual lists and any other variations I could think of but couldn't reproduce the bug you mentioned I'll be closing this ticket as worksforme. Please feel free to post a test case that does reproduce the issue and we'll be happy to reopen.

Changed February 18, 2012 05:20AM UTC by Dilipprasad87@gmail.com comment:3

Thank you for the confirmation....and helping me out...