Skip to content

Instantly share code, notes, and snippets.

@beezee
Created April 12, 2012 11:19
Show Gist options
  • Save beezee/2366593 to your computer and use it in GitHub Desktop.
Save beezee/2366593 to your computer and use it in GitHub Desktop.
var tourApp = {
tabSteps: {
8: 'images',
12: 'users'
},
needsTweaking: function(i) {
return typeof tourApp.tabSteps[i] != 'undefined';
},
clickTabLink: function(i) {
console.log('clicked', i, $("#binno-custom-tabs a[href='#"+tourApp.tabSteps[i]+"']"));
$("#binno-custom-tabs a[href='#"+tourApp.tabSteps[i]+"']").click();
Drawium.tour_next()
}
}
function Drawium_explain_box_displayed(index){
var $next = $('.drawium_next_button');
$next.unbind('click.drawium');
if (tourApp.needsTweaking(index)) {
$('document').undelegate('.drawium_next_button', 'click');
$next.bind('click.drawium', tourApp.clickTabLink(index));
} else {
$('document').delegate('.drawium_next_button', 'click.drawium', function() {
Drawium.tour_next()
});
}
};
jQuery('document').ready(function($) {
$('#drawium_ignition').click(function() {
$("#binno-custom-tabs a[href='#settings']").click();
Drawium.start_tour();
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment