Stop Infinite event handling for ui tabs
<p>I want to show an alert message if user click on second tan without submitting the form on the first tab, the problem I face of infinite alert messages that's show when user click on tab,
here is the code I write</p>

<pre><code> $(function() {
    $('#tabs').tabs({
        selected:&lt;?php echo $param ?&gt;,

        select: function(e, ui) {

            var thistab = ui;
            runMethod();

        }

    });

});
function runMethod(){
    if( $.trim($("#generalImportNo").text()) == "")
    {
        alert("You should fill all main information first.")                     
        $('#tabs').tabs({selected:1 });

    }
}
</code></pre>

<p>I try to use <code>stopPropagation</code> but it doesn't work, how can I prevent infinite event occuring ?!</p>
