From: Mike Taylor Date: Fri, 16 May 2014 11:03:56 +0000 (+0100) Subject: this.node is already a jQuery node, so no need to use $(this.node). X-Git-Tag: 1.0.0~665 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=dd101a4ca83f33db517c9a794844d81412014300 this.node is already a jQuery node, so no need to use $(this.node). (In the past is was a DOMElement, so this WAS necessary.) Omitting the $(...) call means that the Reference Universe widget is no longer dependent on our old $ object still being so named, so that it will work in contexts where another library redefines $. (That's not a hypothetical: Wolfram saw this happen in his work embeddeding widgets in Koha.) --- diff --git a/examples/htdocs/mkws-widget-ru.js b/examples/htdocs/mkws-widget-ru.js index e38d957..97db1a2 100644 --- a/examples/htdocs/mkws-widget-ru.js +++ b/examples/htdocs/mkws-widget-ru.js @@ -5,7 +5,7 @@ mkws.registerWidgetType('ReferenceUniverse', function() { var teamClass = 'mkwsTeam_' + this.team.name(); var html = "

Reference Universe results:

\n"; html += '
'; - $(this.node).html(html); + this.node.html(html); });