If you have the FF Web Developer Extension by Chris Pederick, you can check
which classes are being added to elements within your document by using
"View Generated Source", rather than "View Source"...............

hth

On 01/12/06, Paul McLanahan <[EMAIL PROTECTED]> wrote:

Yeah.. you're right. Even without the quotes your code works perfectly
for me.  I added your code to a test page with svn-jquery and some
divs with id's like "node-12", and checked the dom via both firebug
and the view formatted source extension and the class is there.  I
dunno what to tell you.... I'm using FF 1.5.0.8.

How are you checking the div tags for the class?

On 12/1/06, digital spaghetti <[EMAIL PROTECTED]> wrote:
> Paul,
>
> Actually it is working, Firebug has confirmed it for me, I was trying
> to view source in firefox.  I just hope this means that MicroID
> checked can still pick it up
>
> Tane
>
> On 12/1/06, Paul McLanahan <[EMAIL PROTECTED]> wrote:
> > I don't know if this is the problem or not, but I do notice a type-o
> > in your script:
> >
> > You have:
> > $("[EMAIL PROTECTED]").addClass("microid-' . $hash . '")
> >
> > Should be:
> > $("[EMAIL PROTECTED]'node']").addClass("microid-' . $hash . '")
> >
> > Notice the quotes around "node". I also switched your match from *= to
> > ^= because from your example it appears you were looking for the ID
> > attrib to start with "node".  But the *= should work fine as well.  My
> > quess is that it was the lack of quotes around "node" that's the
> > trouble.  addClass is the correct method to use, I just think that
> > your query isn't finding any nodes.
> >
> > Hope this helps,
> >
> > Paul
> >
> > On 12/1/06, digital spaghetti <[EMAIL PROTECTED]> wrote:
> > > Hey folks,
> > >
> > > I am working on a Microcontent module for Drupal that uses jQuery,
but
> > > I cannot seem to get that functionality to work.  I need to ask,
does
> > > .addClass actually add class text to a tag, or is it just applying
it
> > > in the background.  To explain, my code looks like this:
> > >
> > > $(function(){
> > >      $("[EMAIL PROTECTED]").addClass("microid-' . $hash . '")
> > > });
> > >
> > > Now, $hash is generated from hashing the users email and homepage
url.
> > >  When I add the JS to drupal_add_js, this is how it outputs, so I
know
> > > this bit is working:
> > >
> > > <script type="text/javascript">
> > > $(function(){
> >
>      $("[EMAIL 
PROTECTED]").addClass("microid-48d0e28087a9cb825fbc7e6257fdb00137bf8aa3")
> > > });
> > > </script>
> > >
> > > But when I check any div tags that have <div id="node-n"> (n being
the
> > > node number) the class list still looks the same.  If .addClass is
the
> > > wrong thing, can anyone suggest another way I go about this?
> > >
> > > Regards,
> > > Tane
> > >
> > > _______________________________________________
> > > jQuery mailing list
> > > [email protected]
> > > http://jquery.com/discuss/
> > >
> >
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to