3
I have an input with the code below:
<input type="search" class="filtro tablesorter-filter" placeholder="" data-column="1">
I’m using a css page to try to hide it:
<style> input[data-column=1] { display:none } </style>
But the element continues to be shown on the screen.
When I put it like this it works normally, but there is more than one and the single filter would be just the data-column:
<style> input[type=search] { display:none } </style>
Am I doing something wrong? This attribute because it is not html default is not mapped by CSS?
OBS: I tried to use that seletor { input[data-column=1] }
with Jquery, but also failed.
jQuery is nice and lets you omit quotes, but CSS is not.
– bfavaretto
That’s weird, I swore it was without quotes. When I try to put input[type=search] without quotes it works. Because data-column does not work?
– Joao Paulo
let’s say search is not a value, it’s a property...I don’t know if that’s right, with those words...
– Kenny Rafael
data-elements are like variables, the content you have is a string, and has to be compared like this. the input type because of the HTML4 and previous history has set to give the same with or without quotation marks, but the date- elements didn’t exist before...
– LaPingvino