Called without any parameters, the visible() method returns true if the ComboBox is currently visible and false otherwise.
Calling it with a boolean true or false parameter will show and hide the ComboBox widget.

<input id="combo" ></input>

<script type="text/javascript">

    $(function () {
            dataSource: {
			    data: countries
		    textTemplate: "{name}",
		    valueTemplate: "{code}",
            inputTemplate: "{name}"

        $("#combo").swidget().visible(); // return true
        $("#combo").swidget().visible(false) // hide the widget
        $("#combo").swidget().visible(); // return false