# Vendroid Custom Functions

Custom functions to help build the themes

### Data-* Function

# | Data | Description | HTML Tags | Example
--- | --- | --- | --- | ---
1 | `data-rel="tags-input"` | Modify input into tags | `<input type="text">` |
2 | `data-rel="switch"` | Modify checkbox into switch | `<input type="checkbox">` |
3 | `data-toggle="tooltip"` | Create a tooltip | `<any>`
4 | `data-toggle="popover"` | Create a popover | `<any>`
5 | `data-rel="prettyPhoto"` | Create a prettyphoto over on image | `<a>`
6 | `data-rel="scroll"` `data-scrollheight="200"` | Create vertical scroll content with specific height | `<div>`
7 | `data-action="click-trigger"` `data-action="click-target"` | Open on click modified dropdown list with tags next to it | `<any data-action="click-trigger">` `<any data-action="click-target">`
8 | `data-action="minimize"` | Minimize Closest Widget | `<any>`
9 | `data-action="refresh"` | Refresh Closest Widget, must edit with your own ajax code | `<any>`
10 | `data-action="close"` | Close Closest Widget | `<any>`
11 | `data-action="expand-all"` | Expand all menu in closest navbar | `<any>`
12 | `data-action="nav-left-medium"` | Toggle navbar left to medium size | `<any>`
13 | `data-action="nav-left-small"` | Toggle navbar left to small size | `<any>`
14 | `data-action="nav-right-medium"` | Toggle navbar right to medium size | `<any>`
15 | `data-action="nav-right-small"` | Toggle navbar right to small size | `<any>`
16 | `data-action="remove-navbar"` | Remove left and right navbar | `<any>`
17 | `data-action="remove-header"` | Remove Header | `<any>`
18 | `data-action="fullscreen"` | Remove left and right navbar and header | `<any>`
19 | `data-action="boxedtofull"` | Toggle Between boxed and full width | `<any>`
19 | `data-action="notification"` `data-type="success / notify / info / error"` `data-title="Title"` `data-message="Messages"` `data-position="topleft / topright / bottomleft / bottomright"` | Set notification in a button | `<any>`
20 | `data-action="backtop"` | Go to Top | `<any>`

### Javascript Function Helper

# | Function Name | Description | Example
--- | --- | --- | ---
1 | `isTouch()` | Determine if the device has touch capability
2 | `isMobile()` | Determine your device is a mobile device
3 | `isPhone()` | Determine if your device is phone device
4 | `isTablet()` | Determine if your device is tablet device
5 | `notification(position, notif_type,icon_class,notif_title,notif_text)` | Set Notification via script function
6 | `scrollTo(element,offset)` | Scroll to element with offset