Solved

Sweetalert2 not working on IE

Posted on 2016-08-09
3
77 Views
Last Modified: 2016-11-21
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
Comment
Question by:movieprodw
3 Comments
 
LVL 31

Accepted Solution

by:
Marco Gasi earned 250 total points
ID: 41750336
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
 
LVL 24

Assisted Solution

by:lenamtl
lenamtl earned 250 total points
ID: 41752784
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question