MooTools Multiple Links Class

This is a concept based on the idea that maybe you want a link to go to more then one place. Multiple links if you will.

For Example A company has a page full of images of employees that work for them with links to their Facebook accounts or personal websites. What if I’m not a member of Facebook? What if I prefer following them on Twitter? Or maybe I want all of those options. Well, this is where my idea came into play. It works like a right-click menu (sort of). When you click the image a styled menu appears with all of the links available. If you leave the menu fades out and lets you continue browsing as normal. This is completely customizable and style able so please feel free to make it blend with your site.

Usage

JavaScript

var myMultipleLink = new MultipleLinks('element_id',{ 
	'links' : [ 
			['url','target','title'], 
			['url','target','title'], 
			['url','target','title']		
	] 
});

CSS

.multiple_link{ 
	/* This is the ul */ 
} 
 
.multiple_link_item{ 
	/* This is the actual  li item */ 
}

Obviously those are injected with the actual anchor tags and those can be selected using standard selectors.

Posts Tagged with…

Write a Comment

Your email address will not be published. Required fields are marked *