Write a code to show that how a Loading button works in Bootstraps ?

 Posted by Vivek.Ramapuram on 6/9/2015 | Category: Bootstrap Interview questions | Views: 325 | Points: 40
Answer:

If you want to change the name of the button after the completion of a process.Here we use Javascript and HTML .

Example :
<script type="text/javascript"> 

$(document).ready(function ()
{
$("#ldBtn .btn").click(function () {
$(this).button('loading').delay(2000).queue(function () {
$(this).button('complete');
$(this).dequeue();
});
});
});
</script>

HTML Content
<div id="ldbtn">

<button type="button" class="btn btn-success" data-complete-text="Loading Completed">Load</button>
</div>


Here we give that #ldbtn as div ID
Now run combination and see the output .


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response