I am looking to create a responsive website. I want certain JavaScript, i.e. navigation jquery, to run only on the mobile version, and another navigation jquery to run on the desktop version for the same element. I came across RespondJS (http://responsejs.com/) and Media Check (https://github.com/sparkbox/mediaCheck). I am not sure if they are the right solution, can someone give me a suggestion?
I am looking for something like:
<script>
(some code to check if desktop) {
$(".navigation").runDesktopNavstyle();
$(".slideshow").runDesktopSlideshow();
}
(some code to check if tablet) {
$(".navigation").runTabletNavstyle();
$(".slideshow").runTabletSlideshow();
}
(some code to check if mobile) {
$(".navigation").runMobileNavstyle();
$(".slideshow").runMobileSlideshow();
}
</script>