Skip to main content

Javascript API

We've added many additional JavaScript events so you can listen and trigger custom code when specific events occur. 

TB.render('component_4', function(data) {    
  	//take action here
})

The 'data' will respond with details about the component and the records. 

You can find the component_id from the Page Builder by hovering over the info icon: 

We've also added several additional helpful Functions and will be adding many more functions over time:

//Show the loading gif/spinner
TB.showLoading()

//Hide the loading gif/spinner
TB.hideLoading()

//Show a custom alert toast
TB.showAlert('Done', 'success')

//Unhide a component
TB.showComponent('component_1')

//Hide Component
TB.hideComponent('component_1')

//Navigate to a specific page by ID
TB.navigateTo(page_id)

//Navigate to specific page by Slug
TB.navigateToPageSlug(page_slug)