MSearchable

All MSearchable functions work on DOM elements with the attribute of data-searchable="true".

Methods



show(search:String):void


This accepts a string to search for and will only show data-searchable elemments which contain the string being searched for. All other data-searchable elements will be hidden.

showInside(search:String, search:String):void


This accepts 2 parameters. The first is a string to search for. The second is the id of a container to search within. Unlike the show function, which searches the entire DOM, this function will search only within a specific element. It will show all data-searchable elements within the search element containing the search string and hide all others.

hide(search:String):void


This accepts a string to search for and will hide all data-searchable elemments which contain the string being searched for. All data-searchable elements not containing the search string will be shown.

hideInside(search:String, search:String):void


This accepts 2 parameters. The first is a string to search for. The second is the id of a container to search within. Unlike the hide function, which searches the entire DOM, this function will search only within a specific element. It will hide all data-searchable elements within the search element containing the search string and show all others.