$(document).ready(function() {
$.contextMenu({
// define which elements trigger this menu
selector: ".selecteColor",
className: 'context-style',
id: "contextmenu",
callback: function(key, options) {
//var m = "clicked: " + options.$trigger.attr('id');
adiv_CubeFace = document.getElementById(options.$trigger.attr('id'));
adiv_CubeFace.style.background = key;
cube.getAndRefreshColor();
},
// define the elements of the menu
items: {
blue: {name: "11111111", className: 'blue_style', },
yellow: {name: "22221111", className: 'yellow_style',},
white: {name: "33331111", className: 'white_style',},
green: {name: "44441111", className: 'green_style',},
orange: {name: "55551111", className: 'orange_style',},
red: {name: "66661111", className: 'red_style',},
}
});
$('.context-style').css('width', '20px');
});
I just want to change the width of the contextMenu through
$('.context-style').css('width', '20px');.But i find that it does not work. What should i do to achive that? thanks