Alternative Markup for the search form label within "dataTables_filter" possible?

Alternative Markup for the search form label within "dataTables_filter" possible?

mischahmischah Posts: 2Questions: 0Answers: 0
edited May 2012 in General
Hi, i like to place the label on top of the input field and make it disappear onfocus.

I need a slightly different markup to make ist possible to place the label via CSS.

So I need the following
[code]
Search:

[/code]

instead of
[code]
Search:
[/code]

Is it possible to change the markup without fiddling around in the plugin itself?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Currently no - the label will always surround the INPUT element. You'd need to either modify DataTables core, or use fnFilter and attach it to your own input element (which could be put into a feature plug-in if you so wish).

    Allan
  • mischahmischah Posts: 2Questions: 0Answers: 0
    Thanks for the feedback.

    Michael
  • versakversak Posts: 26Questions: 0Answers: 0
    edited August 2012
    i would like to see this be added in. it makes the input unselectable when using jquery sortables.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    > the html is not correct

    In what way is it not correct? The LABEL and INPUT are implicitly associated which is perfectly valid: http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1 .

    Allan
  • versakversak Posts: 26Questions: 0Answers: 0
    allan, sorry. never noticed it done that way before. my bad.
  • coencoppenscoencoppens Posts: 1Questions: 0Answers: 0
    I have to say I was a little suprised to see it done this way too :-)
This discussion has been closed.