Skip to content
garafu edited this page Aug 5, 2013 · 1 revision

Do the conditions that meet the first to evaluate in order from the first condition.

Syntax:

private {any} depend(
        {object} condition1
        , {object} condition2
        , ...
)

Parameter:

Return:

  • {any}
    Any type of executed result value.

Usage:

$.depend({
    on: $.platform.is('tablet'),
    exe: function () {
        window.location.href = './tablet';
    }
}, {
    on: $.platform.is('mobile'),
    exe: function () {
        window.location.href = './mobile';
    }
});