Klaus Hartl wrote:
>> $('#mailing').enableTab(1).triggerTab(1); does not work, for instance.
>>
>
> Brice, I think something else went wrong there. On a simple test page
> that works fine for me:
> http://stilbuero.de/jquery/tabs/test.html
>
> Maybe you can show some more code here...
>
Klaus, did you try it w/ remote: true; && disabled tabs? Something like;
<div id="mailing">
<ul class="anchors">
<li class="tabs-disabled"><a
href="mailing/composition.php">{t}Composition{/t}</a></li>
<li class="tabs-disabled"><a
href="mailing/template.php">{t}Template{/t}</a></li>
<li class="tabs-disabled"><a
href="mailing/message.php">{t}Message{/t}</a></li>
<li class="tabs-disabled"><a
href="mailing/preview.php">{t}Preview{/t}</a></li>
</ul>
</div>
<script type="text/javascript">
$().ready(function(){
$('#mailing').tabs({remote: true}});
$('#mailing').enableTab(1).triggerTab(1);
});
</script>
(( remember, I need to submit a form on tab click, and only activate the
clicked tab IF the form returns valid (server side validation ))
>> I think the easiest/less ugly way to go about this is to intercept
>> (cancel) the onClick event if it returns false. This way I could submit
>> the form in the onClick and return false. When the form response comes
>> back, I can then either trigger the tab, or alert the error message.
>>
>> Does this make any sense?
>>
>
> I'm not overall sure. Would that be expected behavior? Implementation
> wouldn't be to difficult, so I could do that, but maybe we can work out
> a solution with the existing code...
>
The behavior does not seem obscure to me, and seems to offer more
function than none at all -- in fact, it follows the flow of the general
event system. Like I said, I could not come up with a more elegant
solution... although look forward to any of your suggestions.
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/