Not working on Safari after form submit with page reload
Author: timgavinCreated Nov 9, 2017Updated May 14, 2020
Using Safari 11.0.1 / macOS High Sierra
I've been having issues with Ladda lately in Safari, so I created the following page to test, keeping it as simple as possible. Ladda does not work; no spinner...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.5/ladda.min.css" rel="stylesheet">
</head>
<body>
<form method="POST">
<button type="submit" class="ladda-button" data-style="zoom-in">
Submit
</button>
</form>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.5/spin.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Ladda/1.0.5/ladda.min.js"></script>
<script>
Ladda.bind( 'button[type=submit]', { timeout: 2000 } );
</script>
</body>
</html>I tried the following Javascript too with the same result: no spinner
$('form').submit(function (e) {
var l = Ladda.create(document.querySelector('.ladda-button'));
l.start();
});
Source: hakimel/Ladda