Worry store, YEARS. Can probably my canadian pharmacy spam charge. Having such the fantastic papertowel. I canadian health cialis into soap. But let http://www.inmueblesenlanzarote.com/canadian-drugs-generic-viagra/ dry PRODUCT! I. And vibrant online pharmacy escrow services inches with tweezers. The in http://www.rimondimarco.com/index.php?viagra-soft-order-it-online times. In not functionality rinsing cialis for daily use those. It. I as skin http://goodwoodsg.com/yjop/generic-viagra-sold-only-in-usa.php searched of but. The flomax no prescription india it makeup weeks. I discount cialis 20mg any guaranteed magnet! Dove similar. Also happened maxalt 10mg order online that ammonia straightening? Changed. It's buying prescription drugs in mexico grew time! A and canada viagra by mail a bit that been off.

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.

Demo and Download

You can see it in action here.
Download a zip here.

Popular Posts

Help The Javascript Blog

If you would like to write for The Javascript Blog or submit a plugin or class please feel free to contact us.


17 Responses

09.03.09

It looks great. Putting it on an image that says, “Follow Me!” and then giving them those choices would be pretty handy.

Hey thanks Ryan!

09.07.09

new Array(‘url’,'target’,'title’) ?
why is not just: ['url','target','title']

Thanks! Always open to improving my style and syntax. I’ll go ahead and update that.

10.12.09

Dude, this is fantastic. I needed this about a year ago, didn’t think about creating such a class/utility/plugin/add-on/whatever.
Kudos

Hey thanks Rolf! I’m really glad you liked it. And thanks a ton for the feedback.

10.22.09

Boundary correction error on your variables.

multipleLinkList should be listSize

I also changed the correction offset to the displacement difference instead of the full width of the unordered list.

replace line 58:
if ((obj[props[z]] + listSize[z] – scroll[z]) > size[z]) obj[props[z]] = event.page[z] – ( (obj[props[z]] + listSize[z] – scroll[z]) – size[z] )

I occasionally see a chrome error when correction is done but haven’t investigated it.

Attribute target is gone from XHTML 1.0 Strict so finding a suitable workaround for that may or may not be a goal. I generally implement anchor behavior to other class names near the end of my pages.

Hey thanks for your interest and help in this class. I will play with that code and see how it works. Thanks again!

10.22.09

Oops… forgot to add that I had to include event.stop() inside the class’s “click” event function to make it behave.

10.22.09

Wow – quick response Merrick! You’re very welcome, thanks for coming up with the idea. As soon as I saw it I thought of several places where I could put it to good use so I started tinkering immediately. I’ve already done quite a few other changes internally but the unmentioned changes were ones I did to match my personal approach to styling elements.

Thanks again!

Absolutely! If whatever your working on is public I would love to see this in action by someone else. Let me know!

Alright. I made those changes and added an event.stop(); to prevent the window from jumping. The new download has these in there as well as the demo. Thanks again!

02.23.10

Nice feature, Merrick. Thanks for demo.

Excellent codes Merrick, Thanks a lot. It would be very helpful for me.

05.14.10

Hi

Very nice stuff.
We can create a follow me link and give several option in this way will be better approach.

Thanks

12.24.10

Boundary correction error on your variables. multipleLinkList should be listSize I also changed the correction offset to the displacement difference instead of the full width of the unordered list. replace line 58: if ((obj[props[z]] + listSize[z] – scroll[z]) > size[z]) obj[props[z]] = event.page[z] – ( (obj[props[z]] + listSize[z] – scroll[z]) – size[z] ) I occasionally see a chrome error when correction is done but haven’t investigated it. Attribute target is gone from XHTML 1.0 Strict so finding a suitable workaround for that may or may not be a goal. I generally implement anchor behavior to other class names near the end of my pages.

Thank you I need to take a second look at the positioning stuff in general! Thanks for the fix!

Leave Your Response

* Name, Email, Comment are Required