124
rated 0 times
[
127]
[
3]
/ answers: 1 / hits: 22282
/ 12 Years ago, mon, august 20, 2012, 12:00:00
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.
More From » javascript