Close ColorBox iFrame after submit

后端 未结 8 1455
刺人心
刺人心 2020-12-13 21:01

I\'m using jQuery ColorBox to display a shopping cart item. When a user enters the quantity in the iFrame (opened with colorbox) and clicks on the submit button, I want the

相关标签:
8条回答
  • 2020-12-13 21:39

    Just simply simulate a click on the close button, like this:

    $("#cboxClose").click();
    
    0 讨论(0)
  • 2020-12-13 21:43

    open jquery.colorbox.js find these two pieces of code:

    $close.click(function () {
      publicMethod.close(); 
    });
    
    
    $overlay.click(function () {
      if (settings.overlayClose) {
        publicMethod.close();
      }
    });
    

    replace with these - note the addition of " window.location.reload();"

    $close.click(function () {
      publicMethod.close();
      window.location.reload();         
    });
    
    
    $overlay.click(function () {
      if (settings.overlayClose) {
        publicMethod.close();
        window.location.reload();
      }
    });
    
    0 讨论(0)
提交回复
热议问题