diff --git a/docs/_config.yml b/docs/_config.yml index 4069a3129..8b4618753 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -65,6 +65,8 @@ navigation: url: javascript/todo-list.html - title: Toasts url: javascript/toasts.html + - title: Sidebar Search + url: javascript/sidebar-search.html - title: Browser Support url: browser-support.html icon: fab fa-chrome diff --git a/docs/javascript/sidebar-search.md b/docs/javascript/sidebar-search.md new file mode 100644 index 000000000..8eb20a31c --- /dev/null +++ b/docs/javascript/sidebar-search.md @@ -0,0 +1,71 @@ +--- +layout: page +title: Sidebar Search Plugin +--- + +The sidebar search plugin provides the functionality to search menu items from the sidebar menu entries. + +##### Usage + +This plugin can be activated as a jQuery plugin or using the data API. + +###### Data API +{: .text-bold } + +Activate the plugin by adding the following data-attribue `data-widget="sidebar-search"` to a input-group inside the sidebar. You can use the HTML Markup below for a quick start. + + +###### jQuery +{: .text-bold } + +The jQuery API provides more customizable options that allows the developer to pre-process the request before rendering and post-process it after rendering. + +```js +("[data-widget="sidebar-search"]").SidebarSearch(options) +``` + +##### HTML Markup +Place this HTML Markup after `div.user-panel`. +```html +