-
Notifications
You must be signed in to change notification settings - Fork 2
Responsive
This is where the real power of TemplatIt comes into play. On responsive sites, any template can be tossed anywhere on the page on a per screen state basis.
[THIS PAGE IS INCOMPLETE ...very INCOMPLETE]
preStateChange - this event is triggered the instant BEFORE the screenstate changes and old templates are eaten and new templates are tossed. The values for oldstate and newstate are passed to the bind. example of how to make bind an event to run
//Set event to happen when preStateChange is triggered
$(document).on( "preStateChange", function() {
// Do something that you want to run just before the state changes.
});
postStateChange - this event is triggered the instant AFTER the screenstate changes and new templates are tossed. The values for oldstate and newstate are passed to the bind. example of how to make bind an event to run
//Set event to happen when postStateChange is triggered
$(document).on( "postStateChange", function() {
// Do something that you want to run just after the state changes.
});
templatitInitialized - this event is triggered only once as Templatit is initialzed. It is mainly for internal use by Templatit.