jQuery隐藏div没有成功

时间:2017-12-12 08:02:22

标签: javascript jquery

我试图在成功之后将jQuery用于隐藏div并在网上搜索但没有运气。

请有人指导我。

success: function(json) {
 $('#order_popup_button_'+order_id).removeClass('disabled');
 $('#order_popup_button_'+order_id).val('<?php echo $button_change_order_status; ?>');
  if (json['error']) {
    alert(json['error']);
  }
  if (json['success']) {
    //change colors in background:
    $('#order-status-'+order_id).css('background-color', order_status_background_color[new_order_status_id]);
    $('#order-status-'+order_id).css('color', order_status_text_color[new_order_status_id]);
    $('#order-status-'+order_id).html(new_order_status_name);

    //This part is not working (it's hiding but not as expected)
    $(".go-btn").on('click',function() {
      var v = $('#item1 option:selected').val();
      if (v == 114) {
        $('#testhide'+order_id).hide();
      }
    });
  }
}

0 个答案:

没有答案