Created
February 27, 2018 14:32
-
-
Save RhythmShahriar/e089cfd5af40fbb0eca34bf90feb8d20 to your computer and use it in GitHub Desktop.
Make the DIVI Builder Blurb Module click-able
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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