using jQuery and Gritter in extensions

236 views
Skip to first unread message

Gabe

unread,
Feb 22, 2010, 4:52:25 PM2/22/10
to Chromium-extensions
I'm trying to use the Gritter library (see:
http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/) in an
extension to create these pretty growl-like popups. Unfortunately, I
can't get the library to load. I've tried in background html like
this:

<code>
<script type="text/javascript" src="jquery/jquery-1.3.2.min.js"></
script>
<script type="text/javascript" src="gritter/jquery.gritter.min.js"></
script>
</code>

and in content scripts by including the files in the manifest like
this:

<code>
"js": ["script_finder.js",
"gritter/jquery.gritter.min.js",
"jquery/jquery-1.3.2.min.js"]
}
</code>

In both cases I see an error in the Javscript console: Uncaught
ReferenceError: jQuery is not defined. And in the content scrips I see
"$ is not defined".

What am I doing wrong?


PhistucK

unread,
Feb 24, 2010, 3:15:11 AM2/24/10
to Gabe, Chromium-extensions
Try to change the order in the manifest entries, first put the libraries you want to use and then put the actual content script.

☆PhistucK




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


Reply all
Reply to author
Forward
0 new messages