How to remove cross icon in search box
How to remove cross icon in search box
I have added the search box to my datatable and it works fine, but in IE10 I get an clear icon.
How do I
1) Remove this
2) Wire it up to trigger filter to update. Now it removes text but it does not update the datatable content based on the clear filter
How do I
1) Remove this
2) Wire it up to trigger filter to update. Now it removes text but it does not update the datatable content based on the clear filter
This discussion has been closed.
Replies
[code]
$('.dataTables_filter input').attr('type', 'text');
[/code]
That will change the input element into a started text input rather than a search box.
Allan
"fnInitComplete": function(oSettings, json) {
this.$('.dataTables_filter input').attr('type', 'text');
},
but it did not work :( Is there anyway else to hide it?
Remove the `this.` . `this` in that context is the table node, and the filtering input is outside the table node. Thus your selector won't be finding anything.
Allan
This is how the code looks like
[code]
CV.CVCompositeView = Backbone.Marionette.CompositeView.extend({
itemView: CV.CVtemView,
appendHtml: function (collectionView, itemView) {
collectionView.$("tbody").append(itemView.el);
},
template: "#compositeView-template",
onRender: function () {
var that = this;
oTable = this.$('#dtTable').dataTable({
"bStateSave": true,
"bExpandableGrouping": true,
"bPaginate": false,
"bDeferRender": true,
"bSort": false,
"bProcessing": true,
"sDom": '<"infoExtra"f><"infoExtra"i>rt<"clear">',
"bSortable":false,
"oLanguage": {
"sSearch": "Filter: ",
"sInfo": "Showing _TOTAL_ of _MAX_ entries",
"sInfoFiltered": ""
},
"bAutoWidth": false,
"fnInitComplete": function (oSettings, json) {
$('.dataTables_filter input').attr('type', 'text');
},
[/code]
Allan
::-ms-clear {
display: none;
}
removed it. Thanks a lot!