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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:03:48+00:00 2026-06-09T23:03:48+00:00

Using this code I have this issue: $.fn.dxwShow = function (options) { console.log(typeof(options)); dxwShowSetOptions(options);

  • 0

Using this code I have this issue:

$.fn.dxwShow = function (options)
{
    console.log(typeof(options));
    dxwShowSetOptions(options);

    setInterval(function(){
        dxwShowChange();
    }, dxwShowOptions.time);
};

var dxwShowOptions = {
    "transition" : "SlideToggle",
    "time": 1000
};

var dxwShowStatus = {
    current : 0
};

function dxwShowSetOptions(options)
{
    console.dir(typeof(options));

    dxwShowOptions = Object.create(dxwShowOptions, options);
}

function dxwShowChange()
{
    console.log(dxwShowOptions);
};

$(function()
{
    options = {
        "time": 700,
        "debug" : true
    };

    $("#dxwShow").dxwShow(options);
});

I want to update dxwShowOptions and so I use Object.create passing first the object I wanna copy and so the object containing the new parameters. Where is the mistake?

PS :Chrome say that the object is at the Object.create line.

  • 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-09T23:03:49+00:00Added an answer on June 9, 2026 at 11:03 pm

    Object.create takes a map of property descriptors. options is not such a list.

    See https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/create

    If you wanted to still use Object.create, you’d need to modify options to be something more like

    var options = {
        time: {
            enumerable: true,
            configurable: true,
            writable: true,
            value: 700
        },
        debug: {
            enumerable: true,
            configurable: true,
            writable: true,
            value: true
        }
    };
    

    But probably you want to use something more like _.extend.

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

Sidebar

Related Questions

I have embedded the fullcalendar jquery control by using this code: $(document).ready(function() { var
We have an issue whereby we are using this code below. Its just a
I have been using this code, but have been running into some memory issues:
I have been using this code to implement a Popup JDialog of sorts, like
I have been using this code with great success to pull out the first
I have these 3 tables: and I'm using this code to join them together
I have create a vcf file that contains contacts by using this code ContentResolver
I have a nested oredered list which i m animating using this code... var
I have embeded a music in a webpage using this code: <embed src=upload/gnossiennes.mp3 autostart=true
I have installed the latest embedded binaries from NuGet and am using this code

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.