Primark Online Shopping

Indexhibit Expanding Menus on hover

I made a couple of modifications to Ross Carins great expanding menus script so that they open on rollover. For anyone whos interested. I plan to put an accordion style menu but i think this is a simple solution to start with!

I’m focusing on wordpress for now as its more suitable to my needs but i thought i’d leave this here.

http://indexhibit.org/forum/thread/2891/

/*Expanding Menus for Indexhibit  *uses jquery  *  *Created by Ross Cairns Mar 2008 modified by Benjamin Ashcroft Jan 2009*/

function expandingMenu(num) {

var speed = 200;

var item_title = $("#menu ul").eq(num).children(":first");
var items = $("#menu ul").eq(num).children().filter(function (index) { return index > 0; });
/* hide items if not active */
if (items.is(".active") == false) {
items.hide();
}

/* add click functions + pointer to title */
item_title.css({cursor:"pointer"}).hover(
function () {
items.slideToggle(speed);
})
item_title.css({cursor:"pointer"}).toggle(
function () {
items.hide(speed);
}, function () {
items.show(speed);
})

}
This entry was posted in Web Design and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam Protection by WP-SpamFree

Switch to our mobile site