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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:40:43+00:00 2026-05-31T20:40:43+00:00

Hi I have a page for which I have four different style sheets like

  • 0

Hi I have a page for which I have four different style sheets like this

      <link rel="Stylesheet" href="fancydropdown.css"  title="style-1" type="text/css" />
      <link rel="Alternate" href="fancydropdown_1.css" title="style-2" type="text/css" />
      <link rel="Alternate" href="fancydropdown_2.css" title="style-3" type="text/css" />
      <link rel="Alternate" href="fancydropdown_3.css" title="style-4" type="text/css" />

And this is my HTML

    <div id="menu">
    <ul class="tabs">
<li><h4><a href="#">In the blog &raquo;</a></h4></li>
<li class="hasmore"><a href="#"><span>Styles</span></a>
    <ul class="dropdown">
        <li><a   href="#" rel="style-1">style-1</a></li>
        <li><a   href="#"  rel="style-2">style-2</a></li>
        <li><a   href="#" rel="style-3">style-3</a></li>
        <li><a   href="#" rel="style-4">style-4</a></li>            
        <li class="last"><a href="#">Menu item 6</a></li>
    </ul>
</li>
<li class="hasmore"><a href="#"><span>Topics</span></a>
    <ul class="dropdown">
        <li><a href="#">Topic 1</a></li>
        <li><a href="#">Topic 2</a></li>
        <li><a href="#">Topic 3</a></li>
        <li class="last"><a href="#">Topic 4</a></li>
    </ul>
</li>   
<li><h4><a href="#">Elsewhere &raquo;</a></h4></li>
<li><a href="#"><span>About</span></a></li>
<li class="hasmore"><a href="#"><span>Networks</span></a>
    <ul class="dropdown">
        <li><a href="#">Twitter</a></li>
        <li><a href="#">posterous</a></li>
        <li><a href="#">SpeakerSite</a></li>
        <li><a href="#">LinkedIn</a></li>
        <li class="last"><a href="#">See more&hellip;</a></li>
    </ul>
</li>
<li><a href="#"><span>Bookmarks</span></a></li>

this my dropdown class

     <ul class="dropdown">
        <li><a   href="#" rel="style-1">style-1</a></li>
        <li><a   href="#"  rel="style-2">style-2</a></li>
        <li><a   href="#" rel="style-3">style-3</a></li>
        <li><a   href="#" rel="style-4">style-4</a></li>            
        <li class="last"><a href="#">Menu item 6</a></li>
    </ul>

when I click on style-1 and so on the style sheets shoud be change …..How can I do this using jquery? Can any one help me?

And please provide me the library’s to be used to?

  • 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-31T20:40:44+00:00Added an answer on May 31, 2026 at 8:40 pm

    You just change the HREF of your stylesheet.

    ... HEAD
    <link rel="Stylesheet" href="style1.css" >
    
    ... BODY
    <ul class="dropdown">
        <li><a data-stylesheet="style1.css">style 1</a></li>
        <li><a data-stylesheet="style2.css">style 2</a></li>
        <li><a data-stylesheet="style3.css">style 3</a></li>
    </ul>
    
    ... SCRIPT
    $('.dropdown a').click(function(ev){
        ev.preventDefault();
        $('link').attr('href',$(this).data('stylesheet'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which work like a navigation and a iframe in this
I have a page which essentially looks like this: <div id=foo> <a>One</a>, <a>Two</a>, <a>Three</a>,
I have got four routes defined like this: //Project list with page number routes.MapRoute(
I'm confused as to how to accomplish this. I have a page which, has
I have on master page four user controls which are binded to shared presenter.
Lightbox gallery style, I have four pictures shown on one page, if I move
I have four DIV elements on my page. Each has it's own array which
Windows Phone 7.1/7.5/Mango app. I have four different MediaElements on the page. One is
I have a RibbonBar with four buttons, each of which selects a different view
My situation is this: I have an html page which contains a table of

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.