Skip to content

switch id selector syntax, enables numbers as ids#2

Open
mfrye wants to merge 1 commit into
martinsbalodis:masterfrom
mfrye:master
Open

switch id selector syntax, enables numbers as ids#2
mfrye wants to merge 1 commit into
martinsbalodis:masterfrom
mfrye:master

Conversation

@mfrye
Copy link
Copy Markdown

@mfrye mfrye commented Nov 24, 2014

No description provided.

@qiankunxienb
Copy link
Copy Markdown

You should use

if(/^\d/.test(this.id)) {
    selector += "[id='" + this.id + "']"
} else {
   selector += '#' + this.id;
}

in this case, the old test cases will be passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants