Namespaces

 
1.0.0-SNAPSHOT Arrow_down_16x16
  • (move src-selector dest-selector)
  • (move src-selector dest-selector combiner)
Takes all nodes (under the current element) matched by src-selector, removes
them and combines them with the elements matched by dest-selector.
By default, destination elements are replaced.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source net/cgrand/enlive_html.clj:687 top

(defn move
 "Takes all nodes (under the current element) matched by src-selector, removes
  them and combines them with the elements matched by dest-selector.
  By default, destination elements are replaced." 
 ([src-selector dest-selector] (move src-selector dest-selector substitute))
 ([src-selector dest-selector combiner]
  (fn [node-or-nodes]
    (let [nodes (select node-or-nodes src-selector)]
      (at node-or-nodes
        src-selector nil
        dest-selector (apply combiner nodes))))))
Vars in net.cgrand.enlive-html/move: apply defn fn let
Used in 0 other vars

Comments top

No comments for move. Log in to add a comment.