Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#11354 closed bug (worksforme)

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

Reported by: dilipprasad87@… Owned by: dilipprasad87@…
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 ?

Change History (3)

comment:1 Changed 7 years ago by sindresorhus

Owner: set to dilipprasad87@…
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.

comment:2 Changed 7 years ago by addyosmani

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.

comment:3 Changed 7 years ago by Dilipprasad87@…

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

Note: See TracTickets for help on using tickets.