Unit 7 Essay Criminal Law
(function(){ //thanks http://stackoverflow.com/questions/11387805/touchscreen-media-queries#answer-11387886, //for the solution (looking for support of the ontouchstart event, hopefully a media query become available, that is better, but one doesn't exist yet :) var is_touch_device = 'ontouchstart' in document.documentElement; //these things only apply to touch devices :) if(is_touch_device){ $(window).ready(function(){ $('html').addClass('touch_enabled_device'); }); //inducing a layout with galaxy tab 2 chrome/android, //where it does not always re - layout underlying items, <p> elements in particular //after media query is applied. //bug shows up on shows up on textLeft mediaRight pages.... , when the media pops below, and teh text doesn't stretch all teh way to the right //but if you rotate, from portriate, to landscape, and back to portrait the text does go where it should... /// TODO: Dave, when was this bug discovered and addressed this way? I encountered a similar (perhaps the same) issue when rotating Gal Tab 2 between landscape and portrait... /// It was caused by a buggy default "feature" in mobile chrome browser which I have since disabled (Jan 2013). Test if this bug still exists, if not then please remove this code. -- Russell var induceLayout = function(){ var $eventRoot = $('article') $eventRoot.css('display','inline'); //timeout of 0 is to relinquish the thread, so that the browser can apply things window.setTimeout(function(){ //resetting the display value $eventRoot.css('display',''); //also sending out a resize event, so that things that re-layout with re-sizes, can do so. $(window).resize(); },0); } $(window).ready(induceLayout); /** $(window).load(function(){ induceLayout(); window.setTimeout(function(){induceLayout()},1000)}); **/ } }())