views:

310

answers:

2
A: 

The fact that basic selectors work doesn't necessarily mean that JQuery's selectors are enabled. The first example (the one that works) is something that any browser can understand without JQUery. My guess is that the activating the use of JQuery selectors didn't work out. You might want to post the code you use to activate it.

Pekka
That's a good point! I edited my original post to include my changes to sIFR.
Seth
Are you loading JQuery before sIFR?
Pekka
Yeah. In the html file I've got jQuery loading before sIFR. Both sIFR and jQuery are working properly on the page as well.
Seth
Strange. Maybe you can try a different JQuery specific filter like "contains:"? If that doesn't change anything, is there any way you can temporarily hack JQuery's `$` function and make it output each call to `console.log()` to see whether it gets executed?
Pekka
The "contains" selector didn't work either, and I've added the log output to the original post. ":not(p)" gives the same kind of output except doesn't output any `Unknown pseudo-class or pseudo-element` type error.
Seth
What does sifr.js line 17 contain?
Pekka
In the non-minified version it's `node.parentNode.appendChild(contentNode);`
Seth
What does your "contains" call look like? Do you have a leading colon `:contains`?
Pekka
Yeah, my "contains" call was `selector: ':contains(Disclaimer)',`
Seth
I think "Disclaimer" needs to be in quotes. Can you add quotes?
Pekka
No luck there either using `selector: ':contains("Disclaimer")',` I also just tried updating to jQuery 1.3.2, which didn't change anything.
Seth
That's really, really odd. Can you confirm outside sifr that the selector works, for example by hiding all elements that match the selector?
Pekka
Yeah, I just tried `$(':not(a)').css("visibility", "hidden");` right after sIFR's inclusion in the html file, and every element other than 'a' had `visibility: hidden`.
Seth
All right, then I don't know what to do. Sorry! You may want to open a bounty on this and see whether some JQuery guru wants to take a look at it. Alternatively, I would find it interesting to see what happens if you plug in your own wrapper function into SIFR that then in turn calls `$`. Anyway, that's what I'd try next.
Pekka
A: 

:not(p) looks like a particularly bad replacement to execute, can't you try something that would match fewer elements, especially nested elements?

Mark Wubben
My problem is that all of my elements have class names and id's that are generated dynamically. I want to have the lower level elements use sIFR and the nested elements use normal Arial. So I was hoping to use :not(nested element) as a filter. The other solution I've come up with is to use sIFR to do the nested elements as Arial, but that's not my favorite solution.
Seth
sIFR replaces the entire content of whatever element you point it at. It sounds like you're using sIFR for the wrong purposes, it should be limited to headings really.
Mark Wubben