Hrishi
Hrishi

Reputation: 1434

jQuery in firefox extension

I was creating a firefox extension. and I am including the jquery in the xul file as

    <script type="application/x-javascript" src="libs/project/libs/jquery.js" />

followed by some other files which uses jquery

    <script type="application/x-javascript" src="sample.js" />
    <script type="application/x-javascript" src="sample2.js" />
                     .
                     .
                     .

but here I am getting some errors like

what should I do ?

Upvotes: 2

Views: 541

Answers (1)

Hrishi
Hrishi

Reputation: 1434

Possible reason for this is this bug: http://bugs.jquery.com/ticket/12357

JQUERY 1.8.0 NOT PARSEABLE BY XUL RUNNER APPLICATIONS

You can test this by setting up a simple xul runner window and including jQuery, then alert the typeof jQuery or $ which will result in a response of undefined.

If you paste the jQuery code into a script tag in the XUL main window, you will be able to see all the various parsing issues that have been released in this build.

Upvotes: 2

Related Questions