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 5984259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:20:58+00:00 2026-05-22T22:20:58+00:00

i have two buttons. now i want the vistor to click the button2, the

  • 0

i have two buttons. now i want the vistor to click the button2, the site invoks the style2.css,when click button1. invoks the style.css. the default shows the style.css is there a ways to use jquery change the the link path of css.

<link rel="stylesheet" href="http://www.example.com/themes/style.css" type="text/css"/>

if click button2, change the line to <link rel="stylesheet" href="http://www.example.com/themes/style2.css" type="text/css"/>

or other ways to get the effect. thank you

  • 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-05-22T22:20:58+00:00Added an answer on May 22, 2026 at 10:20 pm

    In button2’s onclick handler, do this:

    $('link').attr('href', 'http://www.example.com/themes/style2.css');
    

    EDIT: Apparently I need to point out that this will affect all link tags if you have more than one, so use an id as your selector if you have more than one link, e.g.:

    <link id="myLink".../>
    
    $('#myLink).attr('href',...);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two buttons in my application Now I want to bind the btnOff
I have an applet which has two buttons on it: When we click Button1
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two buttons, which the user can click and will open a FileDiagloag
guys, I have added two UILongPressGestureRecognizer. What I want is when two buttons are
I have two buttons in my sample Android app. I want to select a
I have two radio buttons what I want is that when I select one
I have an array of my custom made buttons: Button buttons[5] Now I want
I have two buttons that moves a movieclip up/down the Y-axis. How do I
I have two buttons, one for start recording and another for stop recording. i

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.