Solved

JQuery Wordpress link hover functionality

Posted on 2011-02-16
6
324 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now