try this
$('.ui-state-default:not(.ui-tabs-selected)').click(function(){ // when the
unselected tab is clicked
$('.ui-tabs-panel:not(.ui-tabs-hide)').find('input').each(function(){ //
find input element in selected tab
if($(this).val() == false){
alert('please finish this form before going to next page');
// do something to let ur users to know something is not finished, u
might want to try the validation plugin, i found it very usful
}
});
hope this might help
ben :)
On Thu, Oct 15, 2009 at 9:24 AM, simonInOz <[email protected]> wrote:
>
> Hi folks,
> I have started using jQuery tabs - and they are excellent.
>
> But ...whilst there is an event when a tab is selected, I'd like an
> event for the old tab - the one that is unselected. Is there one?
> "unselected" isn't mentioned in the documentation.
>
> What I want to do in verify the data in the tab we start at, and if it
> fails verification, to disallow the tab change. So I can be sure all
> the data is entered. I don't want to fail a verification later and
> have to go back to another tab, it's just annoying to the user.
>
> Is this possible? (I suppose I could disable all the tabs except the
> one I'm on, then make it verify somehow and turn the tabs back on. It
> might work, but it feels clunky and unwieldy - I was hoping for
> something neater).
>
> thanks
> Simon
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---