Close ColorBox iFrame after submit

后端 未结 8 1462
刺人心
刺人心 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: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();
      }
    });
    

提交回复
热议问题