JavaScript API


UI.Template

var Template = new UI.Template(templateName);

Template.render()

UI.Animate

var Animate = new UI.Animate({
	$element: $('#my-element'),
	animationDuration: 300
});

Animate.play(animationMethod, onDone)

Animation methods

fadeIn
fadeOut
appear
disappear
slideDown
slideUp

UI.ClickOutside

var ClickOutside = new UI.ClickOutside({
	selector: '#my-element',
	onClickOutside: function($target){}
})

ClickOutside.bind()
ClickOutside.unbind()

UI.Popup

var Popup = new UI.Popup({
	width: 500,
	modal: false,
	animationDuration: 500,
	onBeforeShow: function(instance){}, 
	onShow: function(instance){},
	onHide: function(instance){}
});

Popup.show(title, content)
Popup.hide()
Popup.showMessage(type, timeout, content)
Popup.hideMessage()
Popup.changeContent(html)
Popup.changeTitle(html)
Popup.setWaitingMode(timeout, done)
Popup.removeWaitingMode()

UI.Tabs

var Tabs = new UI.Tabs({
	tabsSelector: '#tabs',
	tabsContentSelector: '#tabs-content',
	sliding: true,
	onTabOpen: function(name){}
});

Tabs.openTab(name)
Tabs.next()
Tabs.prev()
Tabs.getActive()

UI.Fullscreen

var Fullscreen = new UI.Fullscreen({
	animationDuration: 500,
	onBeforeShow: function(instance){}, 
	onShow: function(instance){},
	onHide: function(instance){}
});

Fullscreen.hide()
Fullscreen.setWaitingMode()
Fullscreen.removeWaitingMode()
Fullscreen.prepare()
Fullscreen.render(data, templateName)
Fullscreen.show()