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

  • SEARCH
  • Home
  • 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 8125253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:45:23+00:00 2026-06-06T06:45:23+00:00

I am having a jQuery Script to find out the resolution of browser and

  • 0

I am having a jQuery Script to find out the resolution of browser and then change its css.

if ((screen.width>=1024) && (screen.height>=768))
{
 alert('Screen size: 1024x768 or larger');
  $("link[rel=stylesheet]:not(:first)").attr({href : "detect1024.css"});
}
else
{
  alert('Screen size: less than 1024x768, 800x600 maybe?');
  $("link[rel=stylesheet]:not(:first)").attr({href : "detect800.css"});
}
});

can you please help me knowing its actual functioning?

what does :not(:first) mean ? Please explain.

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-06T06:45:26+00:00Added an answer on June 6, 2026 at 6:45 am

    actually it means you select every link element with the attribute rel matching the word stylesheet but exclude the first of the found results 🙂

    so if you have three elements in a container and try to select them using :not(:first) you will receive the second and the third one but exclude the first (!) one

    not sure if it that is what you want… but if you have more then one link attribute in header and all except the first are set to that href you might (!) end up having the CSS requested / checked against server / cache several times

    Media queries (thirtydot’s comment) is also a good idea (comment +1)

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

Sidebar

Related Questions

Hi all I seem to be having a problem with my jQuery mobile script.
The following code is having some problem with the jQuery. <script type="text/javascript"> $(window).load(function() {
I'm having some trouble with a jquery script I'm writing, as I cannot get
I'm having trouble with IE, jquery's slidedown() function and the cufon script. The website
Im having some trouble with Jquery Templates and can't seem to figure out what's
I am having a small problem with the jQuery cycle plugin and its timeout.
I'm having troubles with the following code: <link type=text/css href=http://jqueryui.com/latest/themes/base/jquery.ui.all.css rel=stylesheet /> <script type=text/javascript
I am having jquery tabs inside the parent menus, I want to retain the
I am having jQuery animation issues... I have a footer with a hidden div
I am having a JQuery/ASP issue that I hope someone can help me with.

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.