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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:41:13+00:00 2026-05-16T18:41:13+00:00

Im trying to devlop a jquery menu plugin, based on UL and LI tags.

  • 0

Im trying to devlop a jquery menu plugin, based on UL and LI tags.

this is the really basic plugin:

(function($){
$.fn.extend( {
    verticalfade: function(options){

        var defaults = {
            speed: 'normal'
        };
        var options = $.extend(defaults, options);

        return this.each(function(){
            $(this).css('cursor', 'pointer');
        });
    }    
});
})(jQuery);

now i would link to understand how to define a click function for the li element, and how to use .addClass(), .removeClass() and .mouseover() over the li elements, specially how to add a class to the LI i am over and at the same time remove the class from all the other li.

this is the simple html head

<script src="javascript/jquery.verticalfade.js" type="text/javascript"></script>
<link rel="stylesheet" href="verticalfade.css" />
<script type="text/javascript">
<!--
// jquery initialize:
    $(function() {
        $('#verticalfade').verticalfade();
    });
//console.log();
-->

and this the body

<ul id="verticalfade">
   <li>First</li>
   <li>Second</li>
   <li>Thirs</li>
</ul>

while the css

.outText{color:#cccccc;}
.inText{color:#ffffff;}

i qould link al the li to receive the .outText class while the overmouse li only the .inText

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-16T18:41:13+00:00Added an answer on May 16, 2026 at 6:41 pm

    This is a simple demonstration, but you should get the point.

    $('li').live('mouseover', function() {
        var t = this;
        $('li').each(function() {
            if (this != t) $(this).removeClass('bold');
            else $(this).addClass('bold');
        });
    

    In Action: http://jsfiddle.net/zdpZU/

    EDIT

    Given your update you’ll probably want something more like

    $('ul#verticalfade li').live('mouseover', function() {
        var t = this;
        $('ul#verticalfade li').each(function() {
            if (this != t) $(this).removeClass('inText');
            else $(this).addClass('inText');
        });
    }).live('mouseout',function(){ $(this).removeClass('inText'); });​
    

    In Action: http://jsfiddle.net/9ecLW/

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

Sidebar

Related Questions

I am trying to develop plugin using jquery-boilerplate-v3.1 and confused between this and $(this)
I'm new to jQuery so apologies if the answer is basic. I'm trying to
Hello everyone. I am trying to develop a Jquery plugin following the steps I
I am trying to develop an iPhone app using PhoneGap and jQuery Mobile. This
I'm trying to develop a jQuery plugin to do an action when the user
I'm trying to develop a proof of concept where I use jQuery to load
I am trying develop a basic referrer system to my Django website, system will
trying to develop web form using jquery. all i need is to have several
I'm trying to develop image crop using JQuery. I use ajax to upload the
I am trying to develop auto horizontal scrolling for our website using - jQuery.ScrollTo

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.