Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:52:23+00:00 2026-06-15T20:52:23+00:00

<script src=jsv3/jquery.js></script> <!–<script src=jsv3/jquery.mobile-1.2.0.min.js></script>–> Currently I have insert script for desktop version only because

  • 0
<script src="jsv3/jquery.js"></script>
<!--<script src="jsv3/jquery.mobile-1.2.0.min.js"></script>-->

Currently I have insert script for desktop version only because I found that declare two jquery will occur error. Are there any way to check the device type and select different jquery plugin for corresponding device? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:52:24+00:00Added an answer on June 15, 2026 at 8:52 pm

    There are many ways to detect the client. Following example involves userAgent to detect the type of client device.

     $(document).ready(function(e) {
    
            if(navigator.userAgent.match(/Android/i)
                 || navigator.userAgent.match(/webOS/i)
                 || navigator.userAgent.match(/iPhone/i)
                 || navigator.userAgent.match(/iPad/i)
                 || navigator.userAgent.match(/iPod/i)
                 || navigator.userAgent.match(/BlackBerry/i)
                 || navigator.userAgent.match(/Windows Phone/i)) {
    
    
              var file=document.createElement("link");
              file.setAttribute("rel", "stylesheet");
              file.setAttribute("type", "text/css");
              file.setAttribute("href", "css/alternate_css_file.css");
              document.getElementsByTagName("head")[0].appendChild(file);
    
              var file_2= document.createElement("script");
              file_2.setAttribute("type", "text/javascript");
              file_2.setAttribute("src", "js/alternate_js_file.js");
              document.getElementsByTagName("head")[0].appendChild(file_2);
    
        }
    
        });
    

    This is a general solution for detecting client devices. You may have to use different CSS for tablets clients like iPad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script on jquery that load some site in iframe using: $(#demo_frame).attr('src',
<script src = https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js></script> <script type=text/javascript> //waits till the document is ready $(document).ready(function() {
Possible Duplicate: What is my script src URL? I have situation: <script type=text/javascript src=http://server/some.js>
I have a script tag which calls a remote JavaScript snippet through src, and
this is my ajax call <script src = js/jquery.js type = text/javascript></script> <script type=text/javascript>
Sometimes I see script src or image src without schema, only two leading slashes
I have directory structure like following: analytics / / \ \ conf script src
I tried importing jQuery into my Chrome extension, but when I try <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
I'm looking at the http://code.google.com/chrome/extensions/contentSecurityPolicy.html documentation and seeing: { ..., content_security_policy: script-src 'self' https://example.com;
what does script.setAttribute('src', '/json?callback=loadJsonPhotos'); JavaScript code mean?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.