eLABSDK V1.0

API Docs for: 1.0.0
Show:

eLabSDK.GUI.Button

Extends eLabSDK.GUI
Module: eLabSDK

Summary

Creates a GUI button

Constructor

eLabSDK.GUI.Button

Syntax

eLabSDK.GUI.Button

(
  • object
)

Summary

Parameters:

  • object Object
    • label String
    • icon String
      • Font-Awesome class name, i.e. fa-gears
    • action Function

Example:

 var button = new eLabSDK.GUI.Button({
                 label: 'My New Feature',
                 action: function(){
                     alert('Thank you for using this custom feature');
                 }
               });

Item Index

Methods

action

Syntax

action

()

Summary

Triggers the associated action

addCounter

Syntax

addCounter

()

Summary

Adds a counter to the rendered button

Returns:

null

Example:

button.addCounter({ 
    'class': 'className', // optional
    value:'100', //static value
    source: '' // or load from server by adding a api call
}); 

render

Syntax

render

() Object

Summary

Renders the button

Returns:

Object:

JQuery Object

Example:

 var $btn = button.render();
 $('#MyTargetDiv').append($btn);