rwAddLink jQuery plugin

Send Snippet To: Save this snippet to Code Collector Pro -- view all seydoggy's snippets
language: JavaScript
license: Other

Code for Snippet:

	# rwAddLinks (jQuery plugin) #
	AUTHOR:	Adam Merrifield <>
	VERSION: v1.0.0
	DATE: 06-17-11 07:54
	- include this plugin code along with jQuery
	- include an array of URL's with as many items as
		there are elements to link
	- select a group of elements to link
	- invoke .rwAddLinks()
		var someLinks = [
(function($) { $.fn.rwAddLinks = function(linkArr) { var i = 0; $(this).each(function(i) { $(this).click(function() { location.href = linkArr[i++]; }).hover(function() { $(this).css("cursor", "pointer"); }); }); }; })(jQuery);
comments powered by Disqus


Tags: rwAddLinks rapidweaver jQuery plugin links

Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 1606
Date Added: 2011-06-17 14:46:18
Last Modified: 0000-00-00 00:00:00

Web Analytics