Closed afattahi54 closed 7 years ago
Hi @afattahi54!
You should be modifying the defaultOptions
:
$.extend($.keyboard.defaultOptions.css, {
input: ''
});
Thanks!
I want to change the position
and css
so I used:
$.extend($.keyboard.defaultOptions.css, {
input: ''
});
$.extend($.keyboard.defaultOptions.position, {
of: null ,
my: 'right center',
at: 'left center',
at2: 'left center',
collision:'flipfit'
});
The above works
To reduce some line of codes, I try to merge two extend commands:
$.extend($.keyboard.defaultOptions, {
css : {
input: ''
},
position:{
of: null ,
my: 'right center',
at: 'left center',
at2: 'left center',
collision:'flipfit'
}
});
Which does not work ! It seems that the css
property could not be set with this way.
Is it any way I can set defaults by using one $.extend
With jQuery, you'll need to do add a true
flag to perform a deep extend of the position object:
$.extend(true, $.keyboard.defaultOptions, {
css : {
input: ''
},
position:{
of: null ,
my: 'right center',
at: 'left center',
at2: 'left center',
collision:'flipfit'
}
});
I'm guessing this issue has been resolved, so I'm going to close it. If you continue to have problems, please feel free to continue the discussion in this thread.
I want to change some keyboard defaults css and position.
I test below but didn't work