var el = this.element.children(); // 获取当前控件el.css('background', '#D6D6E9'); // 默认颜色el.hover(function(e) { // 控件的鼠标监听 $(this).css("background-color", "#343090"); // 悬移改为蓝色 $(this).css("color", "#d3d3d3"); // 悬移字体改为白色 }, function(e) { $(this).css('background', '#D6D6E9'); // 移除变为灰色 $(this).css("color", "#000000"); // 悬移字体改为黑色 });