See this: http://detectmobilebrowsers.com/
OR
You can verify the screen dimensions:
if ($(window).width() < 480 || $(window).height() < 480) {
//small screen, load other JS files
$.getScript('/js/script.js', function () {
//the script has been added to the DOM, you can now use it's code
});
}
For more information about $.getScript(): http://api.jquery.com/jquery.getscript