Unobtrusive means it will also be shown when no javascript is used. so
only loading through ajax is not.
in my case it is, but my point is that it loads the same content again
through ajax, so it makes an unnessesary server call.

I read the _tabify function,
it knows that the panel is already there, because the title of the
anchor is converted to an id,
afterwards it looks up OR creates the panel.

The thing is, even if a panel is found, it is reloaded by the load
function at the end.
I edited the code for myself, and just added this to the if clause, so
the first time it'll just show, not load
if(typeof $panel === undefined){
.....
}else{
  $.data(a, 'cache.tabs', true);
  // some thing else too... not at the code now, so i'll post the rest
later.
}


On 15 mrt, 14:16, Klaus Hartl <[email protected]> wrote:
> How would the tabs automagically know that it has to use #Texts for
> loading content into? Besides using a single container for all tabs is
> not supported. Speaking of unobtrusive, the tabs will create the
> necessary container for loading ajax content into on the fly, thus it
> can't get any more unobtrusive (no unnecessary divs would exist in
> case JavaScript is disabled).
>
> --Klaus
>
> On 14 Mrz., 19:14, Di Marcello <[email protected]> wrote:
>
>
>
> > I have the following markup:
> > <div class='ui-tabs'>
> >     <ul class='ui-tabs-nav'>
> >         <li class=''><a href="/assets" rel="contents"
> > title="Assets">Assets</a></li>
> >         <li class='ui-tabs-selected'><a href="/texts" rel="contents"
> > title="Texts">Texts</a></li>
> >         <li class=''><a href="/partials" rel="contents"
> > title="Partials">Partials</a></li>
> >         <li class=''><a href="/contents" rel="contents"
> > title="Ui's">Ui's</a></li>
> >     </ul>
> >     <div id='Texts'>
> >      ... content....
> >     </div>
> > </div>
>
> > when i run $('.ui-tabs').tabs(), the right one is selected, so thats
> > all right.
> > but it doesnt use the already rendered div with the id Texts, but
> > reloads it through ajax.
>
> > Am i missing something or is it a bug. I want to stay unobtrusive, so
> > that's why the correct div is already given by html.- Tekst uit 
> > oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to