I have 2 js codes, Code A and Code B , I want the code A to be used only when the max width of the screen is 800px.
And the Code B to be used when max width is 400, but Code A to be disabled. Is there any way to switch between them according on the screen size if the device?
Code A:
jQuery(document).ready(function($) {$("#touchcarousel-1").touchCarousel({"pagingNavControls":true,});});
Code B:
jQuery(document).ready(function($) {$("#touchcarousel-1").touchCarousel({"pagingNavControls":false,});});
Any help would be highly appreciated !
SometimesMost times it's better to write code that works (although behaves differently) in all situations. – Jonathan Feb 26 '14 at 22:49