<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
var f = function(){$('#t').text('Window Width: ' + window.innerWidth)};
f();
$(window).resize(function(){
f();
});
</script>
<span id="t"></span>
So I have this script so I can find the screen size. I want to use the screen size to do this:
if screen size is 320px then do this(some code).
if screen size is 768px then do this(some code).
if screen size is more than 1200px then do this(some code).
How can this be achieved?