Config Loading widget in javascript


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'> 
window.onload=function(){
$(document).on("click", ".show", function () {
    $.mobile.loading("show");
});
$(document).on("click", ".hide", function () {
    $.mobile.loading("hide");
});
}  
</script>
<link rel="stylesheet"
  href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
            $(document).on("mobileinit", function() {
                $.mobile.loader.prototype.options.text = "Please wait..";
                $.mobile.loader.prototype.options.textVisible = true;
                $.mobile.loader.prototype.options.theme = "e";
                $.mobile.loader.prototype.options.html = "";
            });
        </script>
<script
  src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>
  <button class="show" data-inline="true" data-icon="gear">Show</button>
  <button class="hide" data-inline="true" data-icon="delete">Hide</button>
</body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript