Skip to content

Instantly share code, notes, and snippets.

@RhythmShahriar
Created February 27, 2018 14:32
Show Gist options
  • Select an option

  • Save RhythmShahriar/e089cfd5af40fbb0eca34bf90feb8d20 to your computer and use it in GitHub Desktop.

Select an option

Save RhythmShahriar/e089cfd5af40fbb0eca34bf90feb8d20 to your computer and use it in GitHub Desktop.
Make the DIVI Builder Blurb Module click-able
/**
* Make the Blurb Module click-able
* This will find the anchor from title and pass the
* url to full Blurb body
*
* @author Rhythm Shahriar
* @link https://rhythmshahriar.com
*/
$(document).ready(function () {
//in case your target section has an ID to avoid conflict with other Blurb Module
addBlurbURL('#section-id');
});
/**
* Lets add anchor to the body of Blurb
* @param node
*/
function addBlurbURL(node) {
$(node + ' .et_pb_blurb').each(function () {
var anchor = $(this).find('a').attr('href');
$(this).wrap('<a href="'+anchor+'"></a>');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment