overflowstack9 overflowstack9 - 2 months ago 6
Javascript Question

how to remove this click action javascript from the combobox

The below is my code but i just want to implement simple combobox without the click. I mean i want to remove it in html and also in jquery. If i remove

<a href="javascript:void(0)">Click</a>

then which jquery code should i remove in the above code

var CB = $("select").kendoComboBox();



<script class="jsbin" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<link href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.default.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.dataviz.min.css" rel="stylesheet" />
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>

<a href="javascript:void(0)">Click</a>


If you want to remove the click action, just do :


.on() add listener
.click() is equal to .on('click')
.off() remove listener

In your above code, if you don't want the click listener just remove the click part :



So your jquery function will look like this :

    var CB = $("select").kendoComboBox();