Skip to content
Related Articles

Related Articles

jQuery Mobile Textinput destroy() Method

Improve Article
Save Article
Like Article
  • Last Updated : 20 Dec, 2021

jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. 

In this article, we will be using the jQuery Mobile Textinput destroy() method to remove the textinput functionality completely from the widget. This method does not accept any parameter and returns the element back to its pre-init state.


$(".selector").textinput( "destroy" );

CDN Link: First, add jQuery Mobile scripts needed for your project.

<link rel=”stylesheet” href=”//”>
<script src=”//”></script>
<script src=”//”></script>

Example: This example describes the uses of jQuery Mobile Textinput destroy() method.


<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src="//"></script>
    <script src=
        $(function () {
            $("#btn").on('click', function () {
        <div data-role="page" id="page1">
            <div data-role="header">
                    jQuery Mobile Textinput destroy() Method
            <div role="main" class="ui-content">
                <label for="GFG">Text Input:</label>
                <input type="text" name="name" id="GFG" 
            <input type="button" id="btn" 
                style="width: 250px;" 
                value="Destroy the Widget">



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!