New to Kendo UI for jQuery? Start a free 30-day trial

SetAnchor

methods

Re-targets an Anchored FloatingToolBar to a new target element and re-runs the collision handling to keep the widget within the viewport.

<div id="target1" style="width: 150px; height: 80px; border: 1px solid #ccc; margin: 50px;">Target 1</div>
<div id="target2" style="width: 150px; height: 80px; border: 1px solid #ccc; margin: 50px;">Target 2</div>
<div id="toolbar"></div>
<script>
$("#toolbar").kendoFloatingToolBar({
  anchor: "#target1",
  visible: true,
  items: [
    { type: "button", text: "Button" }
  ]
});
var floatingToolBar = $("#toolbar").data("kendoFloatingToolBar");
floatingToolBar.setAnchor("#target2");
</script>
Not finding the help you need?
Contact Support