---
title: "Data loading text on button"  
description: "Data loading text on button"  
author: "Manish Kumar"  
published: 2017-11-27  
updated: 2017-11-28  
canonical: https://www.mindstick.com/forum/34369/data-loading-text-on-button  
category: "jquery"  
tags: ["jquery", "html", "bootstrap", "mvc"]  
reading_time: 1 minute  

---

# Data loading text on button

```
<body>
    <button type="submit" onclick="MyCustomFunction()" id="submit" class="btn btn-primary btn-lg mt-2" data-loading-text="Sending...">Submit message!</button>
</body>
```

I'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to [add data](https://www.mindstick.com/forum/34130/how-to-add-data-into-the-post-method-of-a-form-in-extjs)-loading-[text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) to my [submit button](https://www.mindstick.com/forum/12834/make-text-appear-when-submit-button-clicked-and-checkbox-is-unchecked), but it is not working ..

\

## Replies

### Reply by Sunil Singh

Hi Manish..

You can try this...

```
<head>
    <style></style>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
    <script>
        function MyCustomFunction(){
            $("#submit").text("Loading...");
            $(this).submit('loading').delay(1000).queue(function () {
                // $(this).button('reset');
            });
        }
    </script>
</head>
<body>
    <button type="submit" onclick="MyCustomFunction()" id="submit" class="btn btn-primary btn-lg mt-2" data-loading-text="Sending...">Submit message!</button>
</body>
</html>
```

\


---

Original Source: https://www.mindstick.com/forum/34369/data-loading-text-on-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
