I think the following codes would be useful when I want to make iDangerous swiper responsive to toggle mode between vertical and horizontal.
CSS3 :
@media screen and (orientation:landscape)
{
body
{
background: red;
}
}
@media screen and (orientation:landscape)
{
body
{
background: red;
}
}
$("document").ready( function() {
$('table').each(function(){
$(this).prepend('')
$(this).find('thead').append($(this).find("tr:eq(0)"));
})});
var myTable = jQuery("#myTable");
var thead = myTable.find("thead");
var thRows = myTable.find("tr:has(th)");
if (thead.length===0){ //if there is no thead element, add one.
thead = jQuery("").appendTo(myTable);
}
var copy = thRows.clone(true).appendTo("thead");
thRows.remove();