On the form of a table. In the table there is an input "Price" and "Min. Price". when submitting a form, these fields are checked. It is necessary that the price was not less than the minimum price. If the "Price" field is less, then the input class is assigned .check . Next, I want to highlight all input class='check' . and after 5 seconds the backlight disappears. my jquery:
function lightFields(){ $('#t_sale_order').each(function(){ $(this).find('.check').css({'border-color':'#d8512d'}); setTimeout(function(){ $(this).find('.check').removeAttr('style').removeClass('check'); }, 5000); }); } The backlight is executed; the styles are not deleted after 5 seconds. Can i use setTimeout incorrectly?
htmlmarkup to the question and show the moment when you calllightFields()- Alexey Shimansky