refresh

Forces the Switch to recalculate its dimensions. Useful when major changes in the interface happen dynamically, like for instance changing the skin.

    <div id="foo" data-role="view">
      input
      Flat
    </div>


    <script>
    var app = new kendo.mobile.Application();

    changeSkin = function (e) {
        if (e.sender.element.text() === "Flat") {
            e.sender.element.text("Native");
            mobileSkin = "flat";
        } else {
            e.sender.element.text("Flat");
            mobileSkin = "";
        }

        app.application.skin(mobileSkin);

        $("#switch").data("kendoMobileSwitch").refresh();
    };
    </script>
In this article