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 6602753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:54:50+00:00 2026-05-25T18:54:50+00:00

Consider a list of thumbnails from which the user clicks one to change the

  • 0

Consider a list of thumbnails from which the user clicks one to change the background image. The following scripts lets the user choose a background image and apply it.

$(function() {
        $('.themes li a img').click(function() {
            var image = 'imgs/someimage.jpg';
            //Set cookie
            function setCookie(){
                $.cookie("html_img", image, {expires:7});
                var a = $.cookie('html_img');//get cookie value
                return a;
            }
       });
});

Another script called loadCookie.js loads the cookie which contains the chosen background when the user visits another page:

$(function() {
        var startImage='';
        startImage = setCookie();
        $(document).ready(function(){
            $('html').css("background", startImage);
        });
    });

IE8 says ‘object doesn’t support this action, line 3’; Jquery cookie plugin is installed. I know there is some little mistake I can’t find. Any help making the script work is greatly appreciated.

  • 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-05-25T18:54:51+00:00Added an answer on May 25, 2026 at 6:54 pm

    Not 100% on what you’re trying to do, but I think this is what you’re after (assuming you’re using jquery.cookie.js):

    $(function() {
    
        if($.cookie("html_img")) {
            $('html').css("background", $.cookie("html_img"));
        }
    
        $('.themes li a img').click(function() {
    
            var image = 'imgs/someimage.jpg';
            // var image = $(this).attr('src');
    
            $('html').css("background", image);
    
            $.cookie("html_img", image, {expires:7});
    
            return false;
    
        });
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider a PersonController which has a list action. A user can choose to list
Consider following scenario: I have RESTful URL /articles that returns list of articles user
Consider the following data structure: List<Person> People; class Person { List<Car> Cars; List<Hobby> Hobbies;
Consider the following code: List<double> l = new List<double>(); //add unknown number of values
Consider the following code and assume that list is an synchronized List. List list
Consider the following C# code: [XmlRoot] public class A { [XmlArray] public List<B> ArrayOfBItems
Consider the following list of checkboxes - a list of online and a list
Consider the following list in mathematica: a = { { {0, 0, 0}, {1,
Consider the following list: [LinkNode * head -- LinkNode * node1 -- LinkNode *
I use the following function to perform a conditional operation on a List: consider[data_,

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.