CSS only solution:
http://jsfiddle.net/2YEzP/1/
I recommend you use another class/ID in front of the proposed selectors below, like this: .class123 table tr th:nth-child(1)
or: table.class45 tr th:nth-child(1)
Otherwise you could break other tables on the site!
@media (max-width:480px) {
table tr th:nth-child(1),
.un{
display:none;
}
}
The :nth-child() selector is supported in all major browsers, except IE8 and earlier.
jQuery solution:
It combines the CSS solution and adds jQuery to add support for older browsers. I recommend just that one!
http://jsfiddle.net/aykXG/1/
$( document ).ready(function() {
$( "table tr th:nth-child(1)" ).addClass( "un" );
});
Same note as above: I recommend you use another class/ID in front of the proposed selectors below, like this: .class123 table tr th:nth-child(1)
or: table.class45 tr th:nth-child(1)
This should be a unique selector and will make sure you won't affect another table/cells...
(The solutions keep the HTML unchanged, as requested.)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…