Modify the search box

Modify the search box

ngungongungo Posts: 64Questions: 23Answers: 2
edited February 2018 in DataTables 1.10

Hi,
I envy the datatables.net's search box with a magnify glass icon :). I would like to modify the default search box to that. How do I accomplish that? I guess I have to do these things, but how?
1. Get rid of word "Search:"
2. Put the placeholder "Search..." in side the box
3. Add the magnify glass icon after the box.

Any hints appreciated. Thanks.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    Hi ngungo,

    Yep, easily done. Take a look at this live example - this has a custom search box, placeholder text and a button (which you can change to be an icon) to activate the search.

    Slightly less work, is this live example, which doesn't have the icon, but the search box is the standard DataTables search control.

    Hope that helps,

    Cheers,

    Colin

  • ngungongungo Posts: 64Questions: 23Answers: 2

    Great, Colin. I go with 2nd option. Less work and minimalist. :)
    Thanks

This discussion has been closed.