jquery - .editable table .animate css issue -


i have table jquery .editable, have set when make successful edit, field flashes green or red unsuccessful edit , return original field colour.

the code follows:

$('.editablepm').editable('<?php echo base_url();?>ratesheet/editrowpeakmin/<?=$editable['url'];?>/',          {         callback: function(value){             $(this).data('bgcolor', $(this).css('background-color'));             if(value == this.revert)                 {                                                                                             $(this).animate({ backgroundcolor: "red", color: "white" }, 400);                 $(this).animate({ backgroundcolor: $(this).data('bgcolor'), color: "black" }, 400);                 }             else                 {                                                                                                $(this).animate({ backgroundcolor: "green", color: "white" }, 400);                 $(this).animate({ backgroundcolor: $(this).data('bgcolor'), color: "black" }, 400);                 }              },           name : 'value',          style : 'display:inline; position:relative; right:120px;',          width : '100px',          height: '16px',          onblur : 'submit',       }); 

everything works fine, when field changes appropriate colour on edit, on return, no longer has parent css, , rather adopted js css.

e.g

i have hover function on rows thats highlights selected row in yellow. if deselect row (thus posting change) , leave icon on row, background initial cell remains yellow.

equally if "submit" change of cell while off hover (so not yellow) background of cell returns correct colour no longer responds row highlight.

any appreciated, have tried massive amount of variations in code figure missing.

http://jsfiddle.net/qra6y/ = attempt show happening.

ignore information. if edit field , unselect while still hovering on row, remains yellow, , if unselect while isn't yellow, no longer hovers yellow.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -