Solved

JQuery Wordpress link hover functionality

Posted on 2011-02-16
6
326 Views
Last Modified: 2012-05-11
Hi all,

I want to simulate some functionality I've seen on wordpress where you have a link and when you hover on that link you get some optons (links) under it...

For example: <li><a href="#">Some Link</a></li>

Some when you hover on Some Link you get this under it...

Not Hover =
Some Link


Hover =
Some Link
edit | delete | etc

Hope this helps

THanks


0
Comment
Question by:error77
  • 3
  • 3
6 Comments
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34911108
Try the Hover Plugin. It allows you to add HTML to the hovered object. You can even add images to the hover effect.
0
 

Author Comment

by:error77
ID: 34911421
Oh I think I might not have explained it properly. I'm trying to imitate some wordpress functionality but this is not for wordpress. I just need something using HTML, CSS , Javascript , not a wordpress plugin.

Hope this helps

Thanks again
0
 

Author Comment

by:error77
ID: 34924746
Anyone please?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Accepted Solution

by:
jeremyjared74 earned 500 total points
ID: 34925866
This is a pure CSS solution that has a hover menu. The example I am sending is very basic, but I think it is what you are talking about. Save the code as .html and preview in a browser to see what I am talking about.

<style type="text/css">
 <!--
ul.topmenu li ul {
display:block;
position:absolute;
left:0;
top:1.5em;
visibility:hidden;
width:10em;
z-index:1000;
background-color:#fff;
border:1px solid #000;
border-top:0;
}

-->

<!--
ul.topmenu a {
color:black;
text-decoration: none;

}

ul.topmenu li ul li {
display:block;
width:100%;
background-color:#fff;
color:#000;
margin:0 0 5px;
padding:0;
}

ul.topmenu li ul li a {
display:block;
width:95%;
color:#000;
margin:0;
padding:0 0 0 5%;
}

ul.topmenu li.submenu:hover {
padding-bottom:30em;
}

ul.topmenu li.submenu:hover ul {
left:0;
visibility:visible;
width: 100%;
float: left;
}

ul.topmenu li.submenu:hover ul li {
margin-bottom:0;
}

ul.topmenu li.submenu:hover ul li:hover {
background-color:#ccc;
}

-->

<!--
ul.topmenu,ul.topmenu ul {
display:block;
width:13%;
-webkit-border-radius:8px;
-moz-border-radius:8px;
border-radius:16px;
background-color:#DDD;
font-family:Verdana, Geneva, sans-serif;
font-size:12pt;
color:#888;
text-align:center;
margin:0;
padding:1px;
float: left;
}

ul.topmenu li {
display:inline;
list-style:none;
position:relative;
margin:0;
padding:0 15px 0 0;
}
 </style>
 <ul class="topmenu">
   <li></li>
 <li class="submenu"><a href="#">Link with drop-down</a>
 <ul>
 <li><a href="#">Sub-item 1</a></li>
 <li><a href="#">Sub-item 2</a></li>
 </ul>
 </li>
 </ul>

Open in new window

0
 

Author Closing Comment

by:error77
ID: 34926152
Perfect! THanks a million.
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 34926272
You're welcome.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question