Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2010, 07:23
MadDunDee
 
Fecha de Ingreso: octubre-2006
Mensajes: 199
Antigüedad: 17 años, 6 meses
Puntos: 3
Respuesta: Almacenar y recuperar cookies

Por cierto, ya probé hacer algo así:



Código PHP:
var cookie_name = [selected_themeselected_color];

var 
get_cookie = $.cookie(cookie_name);
    if(
get_cookie != null) {
        $(
"#active-theme").attr({ href"themes/" get_cookie("0") + "/theme.css"});
        $(
"#active-theme-color").attr({ href"themes/" get_cookie("1") + "/theme.css"});
        }

 $(
"#theme-colors li a").click(function() {
    var 
themenamecolor = $(this).attr("rel");
    $(
"#active-theme-color").attr({ href"themes/" themenamecolor "/color.css"});
    
hideDrawer();
    $.
cookie(cookie_namethemenamecolorcookie_options);
    return 
false;
    });
    
    
/* theme switcher */
    
$("#themes-frame a").click(function() {
    var 
themename = $(this).attr("rel");
    $(
"#active-theme").attr({ href"themes/" themename "/theme.css"});
    
hideDrawer();
    $.
cookie(cookie_namethemenamecookie_options);
    return 
false;
    });