Hi Jelte,
You should be able to use requireJS for this, by changing the
following line in your widget:
require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
into
require(["jquery", "sakai/sakai.api.core", "http://widgets.twimg.com/j/2/widget.js
"], function($, sakai) {
When doing that, you should have access to the twttr object inside of
your widget.
I'll create a JIRA for this to be added to our Widget SDK.
Hope that helps,
Nicolaas
On 21 May 2012, at 15:43, Jelte Fennema wrote:
Hey all,
While developing a dynamic Twitter widget, I ran into a bit of
trouble with adding an external Javascript file.
I wanted to use the standard twitter JS file at http://widgets.twimg.com/j/2/widget.js
is able to generate a widget.
The problem was that when adding it in script tags above the widget
load script tags the widget wouldn't load in a normal way.
Eventually I was able to fix it by using the $.getScript jQuery
function.
I suggest it gets added to the documentation that you are supposed
to include other JS files in this way, because it caused a lot of
unexpected behavior.
Jelte Fennema
Webmaster Sakai OAE Inovation project
University of Amsterdam
_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev
_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev