Closed DanielApt closed 9 years ago
Assigning a jQuery wrapped object already works for specifying a subject, exactly the way you suggested. It's another option for subject definition, but not really a replacement for the string selector. The reason we've chosen to use a jQuery string selector (allowing the use of jQuery extended selectors too) is that this way the subject is queried on demand, at the beginning of each step. Sometimes, you simply can't select an element in advance, just because it's not rendered yet. The code sample you've posted already works, but with one condition: at the moment of tutorial's definition, the jQuery expresion $('.container').not('.foo')
must return at least (and only) one element reference.
As this feature already exists, I'm closing this issue. Ok? =)
Instead of using a selector string, it's nice to use jQuery / DOM reference.
So in a step it would be: