Skip to content

Instantly share code, notes, and snippets.

Last active October 22, 2016 06:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
//add a new chart when the user clicks in the list of visualizations
vislist.delegate( 'a[data-id]', "click", function ( e ) {
var id = $( this ).data( 'id' );
addChart( app, id );
} );
// dynamically add a visualization to the tabs
function addChart ( app, id ) {
//create a tab container if it does not exist
if ( !tabContainer ) {
tabContainer = new TabContainer();
//add a new tab and return the id
var tabid = tabContainer.addTab( title );
//call qlik to add the object to the tab
app.getObject( tabid, id );
//call qlik resize when tab is shown
// is the event that jQuery tabs trigger wher a new tab is shown
this.$tabs.delegate( 'a[data-toggle="tab"]', '', function () {
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment