Script Function - fatsecret.onTabChanged = function(tab_id)

Description

The fatsecret.onTabChanged function fires on each canvas change. Override the fatsecret.onTabChanged function to create your own nagivation behaviour (see Managing Navigation for more).

Parameters

Required

Name Type Description
function(tab_id) String Code to execute on every canvas change. tab_id is the navigation element's integer value of the new canvas being navigatied to (see fatsecret.variables.navOptions for complete navigation element list).

Example

Alert the nagivation element integer value for the new canvas being navigated to
<script>
fatsecret.onTabChanged = function(tab_id){
alert(tab_id);
}
<script>
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Support
API

About FatSecret

© 2018 FatSecret. All rights reserved.