We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cae10eb commit 1065939Copy full SHA for 1065939
src/widget.coffee
@@ -41,9 +41,9 @@ class window.JsWidget.Widget
41
# Removes the html from the DOM, if the widget already exists
42
remove_widget_if_existing: ->
43
if window.JsWidget.JQUERY and $("##{@id}").length > 0
44
- $("##{@id}").detach() # TODO: Check for correct method to remove an element
45
- true
46
- # TODO: Implement else branch
+ $("##{@id}").detach()
+ else
+ document.getElementById(@id).remove()
47
48
# Load a template file from the given path via ajax
49
load_template_file: (path, callback) ->
0 commit comments