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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:03:07+00:00 2026-05-24T06:03:07+00:00

Here’s my menu: <ul class="menu"> <li><img src="#" title="???"/></li> <li>Home<img src="#" title="Home"/></li> <li>Forums<img src="#" title="Forums"/></li>

  • 0

Here’s my menu:

<ul class="menu">
 <li><img src="#" title="???"/></li>
 <li>Home<img src="#" title="Home"/></li>
 <li>Forums<img src="#" title="Forums"/></li>
 <li>Chat Rooms<img src="#" title="Chat Rooms"/></li>
 <li>Messages<img src="#" title="Messages"/></li>
 <li>Profile<img src="#" title="Profile"/></li>
 <li>News<img src="#" title="News"/></li>
 <li>Help/FAQ<img src="#" title="Help/FAQ"/></li>
</ul>

Here’s my CSS:

body
{
 background-color: lightred;
 padding: 0;
 margin: 0;
}

.menu
{
 position: relative;
 top: 50px;
 padding: 0;
 margin: 0;
 list-style: none;
}

.menu li
{
 text-align: right;
 border: 1px solid black;
 border-left: 0;
 padding: 0px;
 margin: 0;
 margin-top; 20px;
 margin-bottom: 5px;
 width: 235px;
 position: relative;
 border-top-right-radius: 20px;
 border-bottom-right-radius: 20px;
 left: -195px;
 font-size: 24px;
 font-family: Trebuchet MS;
 background-color: #EEE;
}

.menu li:hover
{
 background-color: #DDD;
 -webkit-box-shadow: 0px 0px 5px black;
 -moz-box-shadow: 0px 0px 5px black;
 box-shadow: 0px 0px 5px black;
}

.menu li img
{
 position: relative;
 top: 3px;
 padding: 0 10px 0 5px;
 margin: 0;
 height: 25px;
 width: 25px;
}

Here’s my page:

<!DOCTYPE HTML>
<html>
 <head>
  <title></title>
  <link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('base_url'); 

?>/styles/main.css" />
  <script type="text/javascript" src="<?php echo $this->config->item('base_url'); ?>/jquery-1.6.2.js"></script>
  <script type="text/javascript">
   $(document).ready(function()
   {
    $('ul li').click(function()
    {
     $(this).slideToggle("slow");
    }
   }
  </script>
 </head>
 <body>
  <?php $this->load->view('menu'); ?>
 </body>
</html>

Ideally, I want my menu items to slide out to the right when I click on it, then slide to the left when I click on something else. I’ve been looking at these sites and am coming up blank.

http://www.learningjquery.com/2009/02/slide-elements-in-different-directions
http://api.jquery.com/slideToggle/

First, I’m not sure if I need to give my list items ids or if I can be generic about it. Originally I had $(.menu li).click(function()... but that didn’t seem to work either. I want a menu like this to conserve screen space as much as possible. I’m using WAMP and CodeIgniter. I believe both are the most recent versions as I’ve downloaded them within the last month. My jquery-1.6.2.js is located in the same folder as Application, System, Styles and User_Guide. Do I have my script link right? I know Toggle might not be the right method as the learningjquery site says to use the animate function and change the left property to go right to left, but I’m just trying it out. Any and all help is appreciated.

  • 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-24T06:03:08+00:00Added an answer on May 24, 2026 at 6:03 am

    This is closer:

    http://jsfiddle.net/qPgjM/

    First thing that needed corrected is that you were structuring your jQuery like this:

    $(document).ready(function()
    {
    }
    

    but it should be like this:

    $(document).ready(function(){
    });
    

    (missing a right parenthesis)

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

Sidebar

Related Questions

Here is my simplified data structure: Object1.h template <class T> class Object1 { private:
Here is my question. I am having this simple menu. <div id=menu> <ul> <li>
Here is some code on the javascript side for form-based uploads: iframe.setAttribute('src', 'javascript:false;'); I'm
Here's a basic regex technique that I've never managed to remember. Let's say I'm
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
Here is my code, which takes two version identifiers in the form 1, 5,
Here's a coding problem for those that like this kind of thing. Let's see

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.