Bug Tracker

Modify

Ticket #3764 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

Possible $() Bug

Reported by: andreyavram Owned by:
Priority: major Milestone: 1.3
Component: unfiled Version: 1.2.6
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, While developing an app I've tried select a dom element using $ function. The problem is that Jquery seems not to be able to handle long ID-s, if I use aaa=document.getElementById('Q29sZHBsYXkgLSBUaGUgU2NpZW50aXN0fHxodHRwOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9VjNLZDdJR1B5ZWd8fHY=').innerHTML; it works fine and I get the text inside, but if I use $('#Q29sZHBsYXkgLSBUaGUgU2NpZW50aXN0fHxodHRwOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9VjNLZDdJR1B5ZWd8fHY=').remove(); (or anything else instead of remove)it doesn't work, JQuery returns in Firebug " Object length=0 prevObject=Object jquery=1.2.6 ". I hope it's not me doing somethig wrong... By the way I wish you a Happy New Year and keep up the good job!!

Change History

comment:1 Changed 5 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to invalid

The problem you are having appears to be because of the '=' sign at the end of your id. That is an illegal character in an id. While it may work at times there is no guarentee and should be expected to work with jquery.

 http://www.w3.org/TR/REC-html40/types.html#type-name

comment:2 Changed 5 years ago by davidserduke

Rather it should NOT be expected to work with jquery.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.