Just like in the title.
I got two files: one is javascript file and one is css file. And if user-agent is an iPad I want to load those files – but only when user-agent is iPad. So below two lines are only loaded when user-agent is an iPad. how can i achieve that
<link rel="stylesheet" href="/c/dropkick.css" type="text/css"/>
<script src="/s/jquery.dropkick-1.0.0.js" type="text/javascript"></script>
Or whatever would be in the
User-Agentheader for an iPad.References:
window.navigator.userAgentdocument.createElementnode.appendChild