Custom class on search input

Custom class on search input

ahmetabdiahmetabdi Posts: 1Questions: 0Answers: 0
edited March 2012 in General
[code]Search: [/code]

How would i added a class to the tag with class="search_box"? Google didn't show anything

Replies

  • lorikay4lorikay4 Posts: 18Questions: 4Answers: 1
    Yes, please, I need to know this also. I need to add a class to whatever classes the dataTable tool puts on the search input field.
  • allanallan Posts: 63,133Questions: 1Answers: 10,399 Site admin
    You would just do $('div.dataTables_filter input').addClass('whatever');

    However, I don't really understand why you would need to do that? If you want to style it, why not just do "div.dataTables_filter input {...}" in your CSS?

    Allan
  • lorikay4lorikay4 Posts: 18Questions: 4Answers: 1
    I would prefer to add a class because would prefer to do as little as possible to the script, and to keep my CSS where I can edit it without breaking the datatables coding. That's why.
This discussion has been closed.