jQM - Button disable method

by Dragan Gaić

HTML

<div data-role="page" id="index">
    <div data-theme="a" data-role="header">
        <h3>
            First Page
        </h3>
    </div>
    
    <div class="container">
        <input type="button" value="Click me" class="button-example"/>
        <a href="#second" data-role="button" class="button-example2">Next</a>
    </div>
    
    <div data-theme="a" data-role="footer" data-position="fixed">
        
    </div>
</div>

JavaScript

$(document).on('pagebeforeshow', '#index', function(){       
    $('.button-example').button('disable');
    //$('.button-example2').button('disable');    
});