JavaScript/jQuery Popover - Specify Toolbar Items

The Popover has two toolbars: top and bottom. Items on these toolbars can be plain text or UI components. To configure the items, populate the toolbarItems array with objects. Each object configures an individual toolbar item. For example, the following code adds two toolbar items to the Popover: one is plain text, another is the Button UI component. They both occupy the top toolbar, because their toolbar property assumes its default value.

JavaScript
HTML
  • $(function() {
  • $("#popoverContainer").dxPopover({
  • target: "#image",
  • showEvent: 'dxhoverstart',
  • hideEvent: 'dxhoverend',
  • width: 200,
  • toolbarItems: [{
  • text: "Title",
  • location: "before"
  • }, {
  • widget: "dxButton",
  • location: "after",
  • options: {
  • text: "Refresh",
  • onClick: function() {
  • // ...
  • }
  • }
  • }]
  • });
  • });
  • <img id="image" src="https://url/to/an/image" />
  • <div id="popoverContainer">
  • <p>Popover content</p>
  • </div>
See Also