webForumDet fria alternativet
Logga in / Bli medlem

Få bort alert medelande?

JavaScript

1 svar · 364 visningar · startad av nilleonline

Medlem sedan sep. 2006119 inlägg
Frågan#1

Jag ska använda detta script på min sida.. (tabber menu)
http://www.barelyfitz.com/projects/tabber/example-cookies.html

Men om ni går in och testar scriptet så får man ett alert medelande.. och jag skulle vilja få hjälp om hur man får bort det..

Medlem sedan juni 2002256 inlägg
#2
/*==================================================
  Set the tabber options (must do this before including tabber.js)
  ==================================================*/
var tabberOptions = {

  'cookie':"tabber", /* Name to use for the cookie */

  'onLoad': function(argsObj)
  {
    var t = argsObj.tabber;
    var i;

    /* Optional: Add the id of the tabber to the cookie name to allow
       for multiple tabber interfaces on the site.  If you have
       multiple tabber interfaces (even on different pages) I suggest
       setting a unique id on each one, to avoid having the cookie set
       the wrong tab.
    */
    if (t.id) {
      t.cookie = t.id + t.cookie;
    }

    /* If a cookie was previously set, restore the active tab */
    i = parseInt(getCookie(t.cookie));
    if (isNaN(i)) { return; }
    t.tabShow(i);
    [red]//alert('getCookie(' + t.cookie + ') = ' + i);[/red]
  },

  'onClick':function(argsObj)
  {
    var c = argsObj.tabber.cookie;
    var i = argsObj.index;
    [red]//alert('setCookie(' + c + ',' + i + ')');[/red]
    setCookie(c, i);
  }
};
254 ms totalt · 4 externa anrop · v20260731065814-full.14655e19
127 ms — deklarationer (db)
0 ms — hämta statistik (cache)
124 ms — hämta tråd, inlägg och bilagor (db)
127 ms — ändringar (db)