$('.editable').editable('/echo/html/', {
callback: function (value) {
$(this).data('bgcolor', $(this).css('background-color'));
if (value == this.revert) {
$(this).animate({
color: "red"
}, 400);
$(this).animate({
backgroundColor: $(this).data('bgcolor'),
color: "black"
}, 400);
} else {
$(this).animate({
color: '#91c83e'
}, 400);
$(this).animate({
backgroundColor: $(this).data('bgcolor'),
color: "black"
}, 600);
}
},
name: 'value',
width: '50px',
height: '16px',
onblur: 'submit'
});http://jsfiddle.net/qrA6y/1/
我在Jeditable上遇到了css问题,当我选择并显示框时,当我取消选择时(因此将输入框返回到<tr>,它会将背景颜色设置为设置时的背景颜色)
也就是说,如果您通过选择同一行上的其他内容来取消选择输入框(使该行以黄色高亮显示),然后将鼠标移开,则背景仍为黄色。
同样,如果您通过取消选择行来取消选择输入框,背景将设置为白色,并且当返回到该行上悬停时,悬停颜色将不再起作用。
发布于 2014-09-13 07:07:35
尝试在css样式中添加悬停,如下所示:
<style>
.editable:hover { #91c83e; }
</style>https://stackoverflow.com/questions/18355513
复制相似问题