Skip to content

codexico/jquery-plugin-lancelot-autolink

Repository files navigation

Introduction
============

jQuery Plugin inspired by Lancelot for KDE no-click interface.

Automatically go to the link only with hover, no need to click!


Example
=======

	$('.lancelot').lancelot({
            hoverTime: 2000,		//time to launch the link in miliseconds
            aclass: "lancelotGo",	//style, @see lancelot.css
            atext: "",				//text to show
            show: "false",			//if true dont hide the lancelots
            speed: "fast",			//speed animation
            linkAction: "location",	//if "open" or "_blank" will try to open a new window
            atitle: "go in 2s",		//link title
            alink: false,			//if 'string' will use as the url, if 'function' will call to build the url
            element: "a",			//element to hover, ex: "span", "div"
            launch: false			//function to call when hoverTime is over
	});

Demo online: http://codexico.com.br/projetos/lancelot/demo/
Real use: http://ttlocal.info

Code for demo on github: http://github.com/codexico/jquery-plugin-lancelot-autolink


Advanced
--------
You can pass functions to "alink" and "launch", example:

    var googleSearch = function(obj){
        //obj is a reference to each $('.lancelot')
        var search = obj.text().replace(/^#/,'');
        return "http://www.google.com/search?q="+search;
    };

	var launcAction = function(obj){
		//do something
    };

	$('.lancelot').lancelot({
		alink: googleSearch,
        launch: launchAction
	});

This will create a link to google search with the text from $('.lancelot') and
execute launchAction when hoverTime is over.

See this working on http://ttlocal.info


License (choose one or more)
===========================

Creative Commons GNU General Public License License:
http://creativecommons.org/licenses/GPL/2.0/

MIT:
http://www.opensource.org/licenses/mit-license.php

GPL:
http://www.gnu.org/licenses/gpl.html


Contact
=======
twitter: @codexico
blog: http://codexico.com.br/blog/jquery-lancelot-plugin


Reference
=========

github:
http://github.com/codexico/jquery-plugin-lancelot-autolink
Project Backlog:
http://www.pivotaltracker.com/projects/104617

Lancelot links:
http://lancelot.fomentgroup.org
http://userbase.kde.org/Lancelot

Blog (portuguese):
http://codexico.com.br/blog/jquery-lancelot-plugin


"Copyleft; All Wrongs Reserved"
http://www.gnu.org/copyleft/copyleft.html

About

jquery plugin that allows navigation with mouse hover. Automatically go to the link only with hover, no need to click

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published