Thanks, but that didn't work. I have <script type="text/javascript"> $(function() { $('#tabcontent > ul').tabs({click: function(clicked, toShow, toHide) { alert(toHide.title); } }); }); </script> <body> <div id="tabcontent"> <ul> <li><a href="doc_properties.php" title="Document"><span>Document</span></a></li> <li><a href="tabs.php" title="Tabs"><span>Tabs</span></ a></li> </ul> </div> </body>
but upon clicking on a tab the alert never gets called. Could you point me to a working example of the concept somewhere online and I just copy their code? - Dave On Feb 14, 9:06 pm, FrenchiINLA <[EMAIL PROTECTED]> wrote: > if you use the click event of tab it pass 3 parameters Tab clicked, > Tab toShow, TabtoHide so you can write something like > var $tabs = $('#foo).tabs({click: function(clicked, toShow, toHide) { > var title = toHide.title; > ..... > > }); > > On Feb 14, 6:28 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > Thanks, but let me throw in an additional wrinkle. Let's say there > > are three tabs, with titles "Properties", "General", and "Misc" and > > you are on tab "General" and then click on tab "Misc". The below > > functionality would get called, even though it is only supposed to be > > called if you are leaving the "Properties" tab. Any way to adjust the > > below for this situation? > > > - Dave > > > On Feb 14, 6:05 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > > > On Feb 14, 9:25 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > > > Thanks, Klaus. I only want to run this form validation if a user is > > > > leaving the tab with a.title = "Properties". How do I screen for that > > > > prior to executing the function? - Dave > > > > var $tabs = $('#foo').tabs().bind('select.ui-tabs', function(e, ui) { > > > if (ui.tab.title.toLowerCase() != 'properties') > > > return validateForm( $('#tabcontent div.ui-tabs- > > > container:visible form')[0] ); > > > > }); > > > > --Klaus- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text -