Skip to content

jQuery plugin to make blocks of content entirely clickable, referring to a link inside of it.

License

Notifications You must be signed in to change notification settings

etiennetalbot/blockLinkr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blockLinkr

CoffeeScript plugin to make blocks of content (element) entirely clickable, referring to a link inside of it.

Requirements

This plugin requires jQuery

Information

  • Links inside of the element will still be clickable and will lead to their respective hrefs
  • If the a tag refered to has a target attribute, that attribute will be considered when the element is clicked
  • If multiple links are found in the element, only the first one will be considered (unless another one is specified in the linkTarget parameter)

Parameters

linkTarget

(string) - Selector to the <a> tag that points to the desired url (if not set, the first encountered in the blockLinkr element will be used)

pointerCursor

(boolean) default: true - Adds "cursor: pointer" to the CSS styling of the element if the cursor isn't already styled

Usage

JavaScript

$('.container').blockLinkr({
  linkTarget: '.links-class',
  pointerCursor: true
});

CoffeeScript

$('.container').blockLinkr
  linkTarget: '.link-class'
  pointerCursor: true

About

jQuery plugin to make blocks of content entirely clickable, referring to a link inside of it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published