This time I will share jQuery Plugin and tutorial about Make Whole Block Content Clickable With JOLD Js-block Plugin, hope it will help you in programming stack.
JOLD Js-block is a small yet useful jQuery plugin that looks for the first link inside your block content and applies the link to the whole block to maximizes the click area.
How to use it:
1. Insert the minified version of the JOLD Js-block plugin after jQuery library.
2 |
integrity = "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" |
3 |
crossorigin = "anonymous" > |
5 |
< script src = "jquery.jold.js-block.min.js" ></ script > |
2. Insert a link into your block content.
1 |
< div class = "block-example" > |
3 |
< p >Cum sociis natoque penatibus et magnis dis parturient. Nihil hic munitissimus habendi senatus locus, nihil horum? Magna pars studiorum</ p > |
3. Call the plugin on the top container. That’s it.
2 |
$( '.block-example' ).joldJsBlock(); |
4. Indicate the block content is clickable.
Changelog:
2019-12-05
This awesome jQuery plugin is developed by joldnl. For more Advanced Usages, please check the demo page or visit the official website.