Created
May 22, 2020 14:25
-
-
Save alexschreyer/5fc81a5dce2e6565b810260ffeb97199 to your computer and use it in GitHub Desktop.
Creating better in-text ads with jQuery
This file contains 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
// Create an in-text ad for long texts by MOVING with jQuery | |
jQuery('.ad').first().insertAfter('.entry-content > p:nth-of-type(4)'); | |
// Create an in-text ad for long texts by COPYING with jQuery | |
jQuery('.ad').first().clone().insertAfter('.entry-content > p:nth-of-type(4)'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment