Material Design Sliding Tabs – example and a question

hi @sandor,

give a id of destScene_currIndex to your tabs.
e.G. -> START_1 and so on …
then attach this script to the element
var info = element.id.split(’_’), //results in [destScene, index]
newIndex = parseInt(info[1]),//index as nbr
transition;

	if(newIndex > window.index){//compare currIndex with new index
	transition = hypeDocument.kSceneTransitionPushRightToLeft //go forward
	}else{
	transition = hypeDocument.kSceneTransitionPushLeftToRight //go back
	}
	
	window.index = newIndex; //newIndex now currindex
	
	hypeDocument.showSceneNamed(info[0], transition, 1.1)//show scene

create window.index = 1 in the head …

not tested, but should work … :slight_smile:

1 Like