Use jQuery while creating Firefox plugin

Hello All,

Since I have expertise in jQuery, I thought can we use jQuery in firefox plgin[xpi]? and answer i decided “YES”.

To use jQuery in your plugin, only thing you need to do is:

  • Download jQuery api “jQuery-min.js” from http://jquery.com/ and paste the same into content directory[..\chrome\content\].
  • Inside browser.xul, you will give reference of the same like below:

    <script src="jquery.js" />
    <script src="youPlugin.js" />
    
  • now inside plugin.js use jQuery like you do.

Let me know your thoughts/queries as well.

Thanks,
ANoop

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>