Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 671
  • Last Modified:

Sweetalert2 not working on IE

I am using the code below, for some reason this works fine on all browsers except IE, can anyone shed some light on it.

click 'Locate Dealer' under the product, it should open a modal window and the window is not popping up on IE
http://tinyurl.com/hlczjyr

<script type="text/javascript" src="https://cdn.jsdelivr.net/sweetalert2/4.0.13/sweetalert2.min.js"></script>
                        <link href="https://cdn.jsdelivr.net/sweetalert2/4.0.13/sweetalert2.min.css" rel="stylesheet" />
                        <script type="text/javascript">// <![CDATA[
                        $(document).on("click", "#swal", function(){
                        
                        swal({
                          title: "",
                          text: "Message",
                          type: "",
                          showCancelButton: true,
                          confirmButtonColor: "#DD6B55",
                          confirmButtonText: "Continue to Dealer Locator",
                          closeOnConfirm: false
                        }).then(function() {
                          window.location.href = "/dealers";
                        });
                        });
                        // ]]></script>

Open in new window

0
movieprodw
Asked:
movieprodw
2 Solutions
 
Marco GasiFreelancerCommented:
IE11 doesn't support promises. Youc an download and include es6-promise. Be sure to include it before sweetalert2.
If it doesn't work, download a pre-2.0 version of es6-promise.
0
 
lenamtlCommented:
Hi
sweetalert2 is compatible with IE.
try the latest version, there was a bug fix 3 days ago about fade animation
https://github.com/limonte/sweetalert2

you can test the demo :  https://limonte.github.io/sweetalert2/

By the way your website popup is working ok on my IE11 W7
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now