JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<div id="accordion">
    <h3>Phone and Email</h3>
    <div>Phone: <input id="text"></div>
    <h3>Phone and Email2</h3>
    <div><a id="change" href="#">Change maxLength2</a></div>
</div>

JavaScript

$( "#accordion" ).accordion();

$( "#text").attr( "maxlength", 4 );

$( "#change" ).on( "click", function() {
    $( "#text" ).attr( "maxlength", 45 );
});