anchor.diff:  %% ====================================================================
   %% @doc Updates contents of a DOM element.
   %% @end
  --spec update(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -update(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"html">>, RenderedElements, true).
  +-spec update(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +update(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"html">>, RenderedElements, true).
   
   
   %% replace/2
   %% ====================================================================
   %% @doc Replaces a DOM element with another.
   %% @end
  --spec replace(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -replace(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"replaceWith">>, RenderedElements, true).
  +-spec replace(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +replace(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"replaceWith">>, RenderedElements, true).
   
   
   %% insert_top/2
   %% ====================================================================
   %% @doc Prepends an element to a DOM element.
   %% @end
  --spec insert_top(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -insert_top(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"prepend">>, RenderedElements, true).
  +-spec insert_top(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +insert_top(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"prepend">>, RenderedElements, true).
   
   
   %% insert_bottom/2
   %% ====================================================================
   %% @doc Appends an element to a DOM element.
   %% @end
  --spec insert_bottom(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -insert_bottom(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"append">>, RenderedElements, true).
  +-spec insert_bottom(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +insert_bottom(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"append">>, RenderedElements, true).
   
   
   %% insert_before/2
   %% ====================================================================
   %% @doc Inserts an element before a DOM element.
   %% @end
  --spec insert_before(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -insert_before(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"before">>, RenderedElements, true).
  +-spec insert_before(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +insert_before(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"before">>, RenderedElements, true).
   
   
   %% insert_after/2
   %% ====================================================================
   %% @doc Inserts an element after a DOM element.
   %% @end
  --spec insert_after(Target :: binary(), Content :: term()) -> ok.
  -%% ====================================================================
  -insert_after(Target, Elements) ->
  -    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  -    wire(Target, <<"after">>, RenderedElements, true).
  +-spec insert_after(TargetID :: binary(), Content :: term()) -> ok.
  +%% ====================================================================
  +insert_after(TargetID, Elements) ->
  +    RenderedElements = gui_str:js_escape(wf:render(Elements)),
  +    wire(TargetID, <<"after">>, RenderedElements, true).
   
   
   %% remove/1
   %% ====================================================================
   %% @doc Removes an element from DOM.
   %% @end
  --spec remove(Target :: binary()) -> ok.
  -%% ====================================================================
  -remove(Target) ->
  -    wire(Target, <<"remove">>, <<"">>, true).
  +-spec remove(TargetID :: binary()) -> ok.
  +%% ====================================================================
  +remove(TargetID) ->
  +    wire(TargetID, <<"remove">>, <<"">>, true).
   
   
   %% show/1
   %% ====================================================================
   %% @doc Displays an HTML element.
   %% @end
  --spec show(Target :: binary()) -> ok.
  -%% ====================================================================
  -show(Target) ->
  -    wire(Target, <<"show">>, <<"">>, false).
  +-spec show(TargetID :: binary()) -> ok.
  +%% ====================================================================
  +show(TargetID) ->
  +    wire(TargetID, <<"show">>, <<"">>, false).
   
   
   %% hide/1
   %% ====================================================================
   %% @doc Hides an HTML element.
   %% @end
  --spec hide(Target :: binary()) -> ok.
  -%% ====================================================================
  -hide(Target) ->
  -    wire(Target, <<"hide">>, <<"">>, false).
  +-spec hide(TargetID :: binary()) -> ok.
  +%% ====================================================================
  +hide(TargetID) ->
  +    wire(TargetID, <<"hide">>, <<"">>, false).
   
   
   %% add_class/2
   %% ====================================================================
   %% @doc Adds a class to an HTML element.
   %% @end
  --spec add_class(Target :: binary(), Class :: binary()) -> ok.
  -%% ====================================================================
  -add_class(Target, Class) ->
  -    wire(Target, <<"addClass">>, Class, false).
  +-spec add_class(TargetID :: binary(), Class :: binary()) -> ok.
  +%% ====================================================================
  +add_class(TargetID, Class) ->
  +    wire(TargetID, <<"addClass">>, Class, false).
   
   
   %% remove_class/2
   %% ====================================================================
   %% @doc Removes a class from an HTML element.
   %% @end
  --spec remove_class(Target :: binary(), Class :: binary()) -> ok.
  -%% ====================================================================
  -remove_class(Target, Class) ->
  -    wire(Target, <<"removeClass">>, Class, false).
  +-spec remove_class(TargetID :: binary(), Class :: binary()) -> ok.
  +%% ====================================================================
  +remove_class(TargetID, Class) ->
  +    wire(TargetID, <<"removeClass">>, Class, false).
   
   
   %% slide_up/2
   %% ====================================================================
   %% @doc Animates an HTML element, displaying it in sliding motion.
   %% @end
  --spec slide_up(Target :: binary(), Speed :: integer()) -> ok.
  -%% ====================================================================
  -slide_up(Target, Speed) ->
  -    wire(Target, <<"slideUp">>, integer_to_binary(Speed), false).
  +-spec slide_up(TargetID :: binary(), Speed :: integer()) -> ok.
  +%% ====================================================================
  +slide_up(TargetID, Speed) ->
  +    wire(TargetID, <<"slideUp">>, integer_to_binary(Speed), false).
   
   
   %% slide_down/2
   %% ====================================================================
   %% @doc Animates an HTML element, hiding it in sliding motion.
   %% @end
  --spec slide_down(Target :: binary(), Speed :: integer()) -> ok.
  -%% ====================================================================
  -slide_down(Target, Speed) ->
  -    wire(Target, <<"slideDown">>, integer_to_binary(Speed), false).
  +-spec slide_down(TargetID :: binary(), Speed :: integer()) -> ok.
  +%% ====================================================================
  +slide_down(TargetID, Speed) ->
  +    wire(TargetID, <<"slideDown">>, integer_to_binary(Speed), false).
   
   
   %% fade_in/2
   %% ====================================================================
   %% @doc Animates an HTML element, making it appear over time.
   %% @end
  --spec fade_in(Target :: binary(), Speed :: integer()) -> ok.
  -%% ====================================================================
  -fade_in(Target, Speed) ->
  -    wire(Target, <<"fadeIn">>, integer_to_binary(Speed), false).
  +-spec fade_in(TargetID :: binary(), Speed :: integer()) -> ok.
  +%% ====================================================================
  +fade_in(TargetID, Speed) ->
  +    wire(TargetID, <<"fadeIn">>, integer_to_binary(Speed), false).
   
   
   %% fade_out/2
   %% ====================================================================
   %% @doc Animates an HTML element, making it disappear over time.
   %% @end
  --spec fade_out(Target :: binary(), Speed :: integer()) -> ok.
  -%% ====================================================================
  -fade_out(Target, Speed) ->
  -    wire(Target, <<"fadeOut">>, integer_to_binary(Speed), false).
  +-spec fade_out(TargetID :: binary(), Speed :: integer()) -> ok.
  +%% ====================================================================
  +fade_out(TargetID, Speed) ->
  +    wire(TargetID, <<"fadeOut">>, integer_to_binary(Speed), false).
   
   
   %% delay/2
   %% ====================================================================
   %% @doc Delays javascript actions on given target.
   %% @end
  --spec delay(Target :: binary(), Time :: integer()) -> ok.
  -%% ====================================================================
  -delay(Target, Time) ->
  -  wire(Target, <<"delay">>, Time, false).
  +-spec delay(TargetID :: binary(), Time :: integer()) -> ok.
  +%% ====================================================================
  +delay(TargetID, Time) ->
  +  wire(TargetID, <<"delay">>, Time, false).
   
   
   %% focus/1
   %% ====================================================================
   %% @doc Focuses an HTML element.
   %% @end
  --spec focus(Target :: binary()) -> ok.
  -%% ====================================================================
  -focus(Target) ->
  -    wire(Target, <<"focus">>, <<"">>, false).
  +-spec focus(TargetID :: binary()) -> ok.
  +%% ====================================================================
  +focus(TargetID) ->
  +    wire(TargetID, <<"focus">>, <<"">>, false).
   
   
   %% set_text/2
  
positive.code: %% @doc Set the content of each element in the set of matched elements
  %% to the specified text.
  %% @end
  -spec set_text(Target :: binary(), Value :: binary()) -> ok.
  %% ====================================================================
  set_text(Target, Value) ->
    wire(Target, <<"text">>, Value, false).
  
  
  %% select_text/1
  %% ====================================================================
  %% @doc Focuses an HTML element (e. g. a textbox) and selects its text.
  %% @end
  -spec select_text(Target :: binary()) -> ok.
  %% ====================================================================
  select_text(Target) ->
      Script = <<"$('#", Target/binary, "').focus().select();">>,
      wire(Script).
  
  
  
negative.code: %% @doc Convienience function to render javascript code.
  %% Eager flag can be used.
  %% @end
  -spec wire(TargetID :: binary(), Method :: binary(), Args :: binary(), Eager :: boolean()) -> ok.
  %% ====================================================================
  wire(TargetID, Method, Args, Eager) ->
      RenderedArgs = case Args of
                         <<"">> -> <<"">>;
                         <<"''">> -> <<"''">>;
                         _ -> <<"'", Args/binary, "'">>
                     end,
      Script = <<"$('#", TargetID/binary, "').", Method/binary, "(", RenderedArgs/binary, ");">>,
      wire(Script, Eager).
  
  
  