hi and thanks for the answer...

i'm on a "browser action" and i'm including jquery.js and others
scripts.js in my popup.html.

i created a span with "toggle" class:

var spanText = document.createTextNode('[ + ]');
var span = document.createElement('span');
span.className = 'toggle';
span.style.cursor = 'pointer';
span.appendChild(spanText);

but this code only outputs "$ is loaded", no response when i click the
span:

$(document).ready(function(){
        console.log('$ is loaded');
        $('.toggle').click(function(){
                console.log('span clicked');
        });
});

On Nov 24, 8:13 pm, Marcos Aruj <[email protected]> wrote:
> It is working fine for me, also doing some more complex things. In what
> context are you including the jQuery js file?
>
>
>
>
>
> On Tue, Nov 24, 2009 at 1:03 PM, lorenx <[email protected]> wrote:
> > hi all,
> > i included the library and $(document).ready() works as expected.
>
> > what i'm not able to do is, for example, a simple task like the
> > following:
> > assigned a class to a dom element, i'm not able to intercept the click
> > as i normally do with $('.className).click().
>
> > is there something i miss?
> > thanks very much.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<chromium-extensions%2Bunsu 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/chromium-extensions?hl=en.
>
> --
> Marcos Aruj Alvarez
> Ingeniero de Software
> -------------------------------
> [email protected]
> -----

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to