ui element access in JQuery Tabs
<p>I use this simple example to forbid access to the second tab. Returning false works fine, but I have to look first, which tab is to be selected. The ui paramter is an object, alert(ui), but I can not use any ui variables or functions. Do I have to cast the object to something?</p>

<pre><code>&lt;!doctype html&gt;
&lt;html lang="de"&gt;
&lt;head&gt;
    &lt;meta  http-equiv="content-type" content="text/html; charset=ISO-8859-1" /&gt;
    &lt;title&gt;tabs demo&lt;/title&gt;
    &lt;link rel="stylesheet" href="css/jquery-ui.css"&gt;
    &lt;script src="libraries/jquery-1.8.3.js"&gt;&lt;/script&gt;
    &lt;script src="libraries/jquery-ui.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="tabs" style="position:absolute;top:0px;left:0px;width:800px;height:600px"&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href="#fragment-1"&gt;&lt;span&gt;Überblick&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#fragment-2"&gt;&lt;span&gt;System&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;div id="fragment-1"&gt;
        &lt;p&gt;First tab is active by default:&lt;/p&gt;
        &lt;pre&gt;&lt;code&gt;$( "#tabs" ).tabs(); &lt;/code&gt;&lt;/pre&gt;
    &lt;/div&gt;
    &lt;div id="fragment-2"&gt;
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh     
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod 
    &lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;

$(function() {
   $( "#tabs" ).tabs({

        beforeActivate: function( event, ui ) { alert( ui.newTab.id ); }
    });
});


&lt;/script&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
