liu201312

$("body").undelegate();
$("body").delegate(".edit_html_one,.edit_html_two,.edit_del,.edit_html_remarks", "click hover", function () {
$(\'.edit_html_one\').click(function(){
if(!$(this).is(\'.input\')){
$(this).addClass(\'input\').html(\'\').find(\'input\').focus().blur(function(){
var total = $(this).attr(\'data-price\');
var price = $(this).val();
var qt_price = parseFloat(total)-parseFloat(price);
if(qt_price){
$(this).parent().parent().find(\'.edit_html_two\').html(qt_price.toFixed(2) || \'\');
}else{
$(this).parent().parent().find(\'.edit_html_two\').html(\'\');
}

               if(price){
                   $(this).parent().removeClass(\'input\').html(parseFloat(price).toFixed(2) || \'\');
                }else{
                    $(this).parent().removeClass(\'input\').html(\'\');
                }
          });
        }
      }).hover(function(){
        $(this).addClass(\'hover\');
      },function(){
        $(this).removeClass(\'hover\');
      });
     
});

分类:

技术点:

相关文章:

  • 2022-02-12
  • 2021-12-08
  • 2021-11-02
  • 2021-12-09
  • 2021-12-05
  • 2021-06-12
  • 2021-11-05
  • 2021-11-05
猜你喜欢
  • 2021-12-19
  • 2022-02-09
  • 2021-10-19
  • 2021-10-19
  • 2022-02-09
  • 2021-10-19
  • 2021-11-10
相关资源
相似解决方案