Hello Stackoverflow people, I hope you have a great day. I'm working on a project and I have to use the tabs elements of the Materializecss framework (a material design framework). Basically I want to achieve the following behavior in the tab element: the user must be able to edit the name of the tab element by double clicking on the current name, you must be able to edit the name as many times as you want by double clicking on the name you already have.
The materialize tab element is shown in the following image:
In this image, you can see that there are two tabs (also called tabs), well, I want that by double clicking, for example, in the name "NEWFILTER" (name of the first tab) you unlock or automatically appear a text box with the current name "new filter" and the possibility to delete that text and enter a new name. When the user finishes, press the enter key and the new name should automatically be placed as the name of the current tab. They understand me??? How can I do that with jquery or javascript? Any ideas? Here is the code of the materializecss tab element:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<div class="row">
<div class="col s12">
<ul class="tabs">
<li class="tab col s3"><a class="active" href="#test1">NEWFILTER</a></li>
<li class="tab col s3"><a href="#test2">New Tab</a></li>
</ul>
</div>
<div id="test1" class="col s12">BODY TAB 1</div>
<div id="test2" class="col s12">BODY TAB 2</div>
</div>