jquery exit function in ajax call
<p>I have a javascript function.
and in there, I insert a ajax call function using jquery.</p>

<p>depends on ajax call result, 
I want to exit hi function.</p>

<p>is there anyway to do this?</p>

<pre><code>function hi()
{
    $.ajax({
            url: "/shop/haveItem",
            type: "GET",
            async:false,
            success: function(data){
                if(data == '1')
                    //exit hi() function
            }
        });

    //some executable code when data is not '1'
    ...
}
</code></pre>
