Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7762857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:31:00+00:00 2026-06-01T14:31:00+00:00

I am trying to save and use a cookie to know what kind of

  • 0

I am trying to save and use a cookie to know what kind of viewStyle user wants. There is a swich for this cookie.

This is how I want to update the cookie

                $('body').on('click','.viewBy li a',function(){
                    if($('.titular').length > 0){
                         $.cookie('viewBy','titular',{expires:30});
                    }else{
                         $.cookie('viewBy','',{expires:30});
                    }
                });

And this is how i am checking

                if($.cookie('viewBy')){
                        $('.viewBy li').toggleClass('active');
                        $('.recetaTitular').addClass('titular');
                } 

But i get this firebug error:

$.cookie is not a function
[Parar en este error]   

I tried with

                if(typeof $.cookie('viewBy') != 'undefined' &&($.cookie('viewBy'))){
                        $('.viewBy li').toggleClass('active');
                        $('.recetaTitular').addClass('titular');
                } 

But getting same error

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:31:01+00:00Added an answer on June 1, 2026 at 2:31 pm

    $.cookie is not a jQuery function. You need to include a plugin, perhaps this one:

    https://github.com/carhartl/jquery-cookie

    After you load the jQuery plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use a MySQL database to save player information, but whenever there
I have been trying to use/save the boolean value of a checkbox in other
Hi I am trying to use NSUserDefaults to save some default values in database.
I am trying to save data into cache using ASIHTTP ( http://allseeing-i.com/ASIHTTPRequest/How-to-use#using_a_download_cache ). I
I am trying to use NSUser Deafault in my application user have tp fillup
Im trying to save a screen from my app with th use of a
I have a problem when I use GSON. First off I'm trying to save
I'm trying to use the facebook api to get the app user's profile pic
I am having troubles trying to understand how to use Save before Exit plugin
Trying to save the $_SESSION['uID'] within the session to use for functions like pulling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.