EditorFor field clear button with javascript
<p>having Html code :</p>

<pre><code>&lt;div class="form-group has-feedback"&gt;
    @Html.LabelFor(model =&gt; model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
    &lt;div class="col-md-10"&gt;
        @Html.EditorFor(model =&gt; model.Name, new { htmlAttributes = new { @class = "form-control", @placeholder = "Name" } })
        @Html.ValidationMessageFor(model =&gt; model.Name, "", new { @class = "text-danger" })
        &lt;span class="form-control-clear glyphicon glyphicon-remove form-control-feedback"&gt;&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt; 
</code></pre>

<p>trying to make clear button with javascript :</p>

<pre><code>$(document).ready(function() {
    $('.form-control-clear').on("click", function () {
        $(this).val('')
    });
}); 
</code></pre>

<p>but not working</p>