Questions tagged [sizzle]

Sizzle is a JavaScript CSS selector engine.

Sizzle is a pure-JavaScript CSS selector engine. CSS 3 selectors are supported, plus an additional set of custom selectors.

Resources

165 questions
5
votes
2 answers

unrecognized expression: :[type=checkbox] with jQuery 1.8

I update the code to jQuery 1.8 and I start getting this error: unrecognized expression: :[type=checkbox] Of course this is say that the expression :[type=checkbox] is not recognized by the new version of jQuery and my question is: I have type it…
Aristos
  • 66,005
  • 16
  • 114
  • 150
4
votes
1 answer

JQuery 1.7.1 seemingly can't handle HTML5 element IDs

As you may be aware, HTML5 allows more characters to be used in ID names - see the HTML5 spec which now has space as the only invalid character. Attempting to use this with JQuery shows JQuery ignoring all characters in the ID after a particular…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
4
votes
1 answer

Method for selecting elements in Sizzle using fully-qualified URLs

While working on a script recently, I came across a peculiar nuance of how Sizzle works with the href attribute. Specifically, using an attribute selector on an href, Sizzle will use the actual attribute value: // Will not find
Jared Farrish
  • 48,585
  • 17
  • 95
  • 104
4
votes
1 answer

jQuery 1.6.2 Upgrade causing problem with meta selector

This worked fine with 1.4. var ogimagetag = $('meta[property=og:image]').attr('content'); gives me Uncaught Syntax error, unrecognized expression: [property=og:image] The error seems to be sizzle. Sizzle.error = function( msg ) { throw…
jhanifen
  • 4,441
  • 7
  • 43
  • 67
4
votes
1 answer

jQuery - finding an element with multiple HTML tag attributes in it

Why using this: var parent = $('div.form.offer_mails'); var period = parent.find('input[type=checkbox,name=timeperiod]'); I get this (exception in my Mozilla Firefox Error Console): Error: uncaught exception: Syntax error, unrecognized expression:…
metaforce
  • 1,337
  • 5
  • 17
  • 26
4
votes
2 answers

Does $("body") use Sizzle Engine?

I understand that $("#id") is faster because it maps to a native javascript method. Is the same true of $("body")?
Matrym
  • 16,643
  • 33
  • 95
  • 140
4
votes
4 answers

Minified Sizzle

I can't find minified sizzle =( And if i trying to make it myself by yuicompressor, after that, some features not work. Please help.
ololo
  • 108
  • 1
  • 7
4
votes
1 answer

Why does Sizzle evaluate selectors from right to left?

Why does Sizzle evaluate selectors from right to left? Can anybody give me examples to explain why it will be faster when the selectors are evaluated from right to left than from left to right? As this mentioned, browser is different from the usual…
Light
  • 474
  • 5
  • 15
4
votes
2 answers

What's the meaning about characterEncoding

I'm reading the Sizzle source code. I'm confused when I read the regular about characterEncoding. In the source code, the characterEncoding defined as below: characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+" It looks try to match \\. or \w- or…
user2155362
  • 1,657
  • 5
  • 18
  • 30
4
votes
4 answers

[Rails]jQuery: Syntax error, unrecognized expression

I've a problem with my Rails 3 app: I've a script in my view to display a progress bar for an upload (the upload process works):

Ajouter des images:

<%= form_for [:admin, :gallery, @painting], html: { multipart: true} do |f| %> <%=…
khcr
  • 103
  • 1
  • 8
4
votes
4 answers

Wildcards in HTML5 data attributes

Is it possible to find all DOM elements with jQuery with wildcards in the attribute name? Consider the following HTML:
madflow
  • 7,718
  • 3
  • 39
  • 54
4
votes
1 answer

Select child element of cached node using Sizzle

Anybody familiar with Sizzle? Is there support for selecting children of cached DOM nodes? Like jQuery: var body = jQuery('body'); var div = jQuery('#mydiv',body); 10x for your kind help, BR
kidwon
  • 4,448
  • 5
  • 28
  • 45
4
votes
3 answers

what does this mean? what string will be matched using the expression?

I checked the sizzle code and see a definition. var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, I want to know how to find out what string(s) this…
Dorsey
  • 854
  • 3
  • 9
  • 17
3
votes
2 answers

Style table cells using jQuery

I'm trying to style table cells within a table based upon whether or not the contain the character | in the url or not (don't ask, dealing with SharePoint). Sample HTML;
MarkP
3
votes
1 answer

Very weird Chrome behavior in an open (focused) "select" element

Here's a Here's a little bit of…
Pointy
  • 405,095
  • 59
  • 585
  • 614
1 2
3
10 11