Reputation: 303
This code can run on chrome and firefox. but just the safari cannot make it work... what's the problem now? jquery should be no problem to run at all browser..
the click function element is on the button tag.
$( document ).ready(function() {
$('#loading-icon').hide();
$('.complete-order').click(function() {
$('#loading-icon').show();
$(function () {
count = 0;
wordsArray = [" Please wait... loading...", " Don't close your browser...", " We are setting up your website...", " Running the system..." , " Almost complete..."];
setInterval(function () {
count++;
$("#loading-icon span").fadeOut(400, function () {
$(this).text(wordsArray[count % wordsArray.length]).fadeIn(400);
});
}, 2000);
});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="text-center padding-loading">
<div id="loading-icon">
<i class="fa fa-spinner fa-spin"></i>
<span> Please Wait... Loading...</span>
</div>
</div>
<button type="submit" id="btnCompleteOrder" class="complete-order btn btn-primary btn-lg" onclick="this.value='{$LANG.pleasewait}'">
button<i class="fa fa-arrow-circle-right"></i>
</button>
Upvotes: 0
Views: 2038
Reputation: 339
I think you can try below code.
$(document).on("click",'.complete-order',function(){
// You code
});
Upvotes: 0