No that's wrong. As I already stated:

The problem with your loadTab function was that it was
reinitializing tabs turning them into in-page tabs as all anchor
elements are already pointing to a hash at that point of time.

In other words, you must not call tabs() a second time.

The problem with using a function in javascript: is that the keyword
"this" doesn't refer to what I expected it to. By using this technique
you're making things unnecessarily difficult.

You're saying that you need some links to have that behaviour and some
not. That is easy and that's what selectors are for.

So, I suggest to add a certain class, for example "remote", to these
links and select only these:

<a class="remote" href="ahah_3.html">I will load content via Ajax</a>

$(function() {
    $('#container-8 > ul').tabs({
        load: function(ui) {
            $('a.remote', ui.panel).click(function() {
                $(ui.panel).load(this.href);
                return false;
            });
        }
    });
});


--Klaus


On 16 Jun., 23:30, keny <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Without the return statement nothing happen :-(
>
> And i understand why you told me to choose a normal link but dont
> worry ist in a member section of my site and google dont even crawl
> those web page. And i can't use the second function as in the page i
> show i whant some link to point to my function (and load in tab) and
> some to do not load in tab that why i try to use the first function.
>
> that no way to use that one and reload the tab to work after ?
>
> function loadTab(tab) {
> var tab ;
>
>         $('#container-8').tabs({
>     load: function(ui) {
>
>             $(ui.panel).load(tab);
>
> // here someting to make it work ???
>
>     }
>
> });
> }
>
> thanks you
>
> On 16 juin, 02:12, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > Sigh, I'm not used to using javascript: urls in links, which is
> > considered bad practice. Please change it to:
>
> > javascript:void(loadTab( 'ahah_3.html' ));
>
> > Removing the return statement should also work:
>
> > function loadTab(url) {
> >     $(this).parents('#container-8').load(url);
>
> > }
>
> > Please 
> > read:http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Op...
>
> > But I encourage you to use a standard link
>
> > <a href="whatever.html">...</a>
>
> > and bind an event to ajaxify this link by using the load callback in
> > tabs itself. All you need is this then:
>
> > $(function() {
> >     $('#container-8 > ul').tabs({
> >         load: function(ui) {
> >             $('a', ui.panel).click(function() {
> >                 $(ui.panel).load(this.href);
> >                 return false;
> >             });
> >         }
> >     });
>
> > });
>
> > --Klaus
>
> > On 16 Jun., 01:01, keny <[EMAIL PROTECTED]> wrote:
>
> > > Hi, thanks again for answer me,
>
> > > Your function dont work, it only show in another page the word false
>
> > > I have try all of these combinaison whit the same result :
>
> > > function loadTab(url) {
> > > var url;
> > >     $(this).parents('div.ui-tabs-panel').load(url);
> > >     return false;
>
> > > }
>
> > > function loadTab(url) {
> > >     $(this).parents('#container-8').load(url);
> > >     return false;
>
> > > }
>
> > > See by yourself here :http://www.snipvideo.com/tabs/
>
> > > Thanks
>
> > > On 15 juin, 18:27, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > Ah, I see. Please change the loadTab function to this:
>
> > > > function loadTab(url) {
> > > >     $(this).parents('div.ui-tabs-panel').load(url);
> > > >     return false;
>
> > > > }
>
> > > > and try again. The problem with your loadTab function was that it was
> > > > reinitializing tabs turning them into in-page tabs as all anchor
> > > > elements are already pointing to a hash at that point of time.
>
> > > > --Klaus
>
> > > > On 15 Jun., 16:55, keny <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi,
>
> > > > > Ya like i said everyting work the link is loaded but afther that,
> > > > >  even if you click on tab 1 or 2 or 3 the page d'ont load anymore ist
> > > > > stay to page 3
>
> > > > > If i click tab 1 ist should reload the page 1 same thing for tab 2 ...
>
> > > > > Thank you !
>
> > > > > On 15 juin, 02:50, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > So what is going wrong now? To me it looks like everything works as
> > > > > > expected (Tabs are loading correctly and the link saying "This link
> > > > > > load page 3 in current tab via ajax" does exactly what it says)...
>
> > > > > > --Klaus
>
> > > > > > On 15 Jun., 00:36, keny <[EMAIL PROTECTED]> wrote:
>
> > > > > > > hi thanks for helping
>
> > > > > > > i have upload a new version and still dont work
>
> > > > > > > no sherif code in this one
>
> > > > > > >http://www.snipvideo.com/tabs/
> > > > > > > help is very appreciate
>
> > > > > > > On 14 juin, 01:58, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > On 13 Jun., 23:17, keny <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > Thanks
>
> > > > > > > > > Is there a way to make a function that will work ? I am not 
> > > > > > > > > expert in
> > > > > > > > > JS like you. Maybe you can check this site that offer tab and 
> > > > > > > > > a
> > > > > > > > > function that work to load link via ajax in there tab :
>
> > > > > > > > All you need to do is *not* include the Red Sheriff tracker code
> > > > > > > > included in the Ajax tab pages...
>
> > > > > > > > --Klaus- Masquer le texte des messages précédents -
>
> > > > > > - Afficher le texte des messages précédents -- Masquer le texte des 
> > > > > > messages précédents -
>
> > > > - Afficher le texte des messages précédents -- Masquer le texte des 
> > > > messages précédents -
>
> > - Afficher le texte des messages précédents -

Reply via email to