Last active
May 26, 2016 20:55
-
-
Save mkv27/403874e1b8382a9353d8b172af3f466f to your computer and use it in GitHub Desktop.
Create code inread
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
(function($){ | |
var n = $( ".post-full_entry > p" ).length; | |
var nth = Math.floor(n/2)+1; | |
var sel = ".post-full_entry > p:eq("+(nth-1)+")"; | |
sel = $(sel); | |
if(sel.height() == 20){ | |
nth++; | |
sel = ".post-full_entry > p:eq("+(nth-1)+")"; | |
sel = $(sel); | |
} | |
sel.after('<div class="box-mail-post">'+ | |
'<h4>Recibe noticias directamente en tu correo</h4>'+ | |
'<form id="suscribe_frompost" novalidate="true">'+ | |
'<input id="mc-email" type="email" placeholder="Tu correo aquí" class="text" name="EMAIL">'+ | |
'<input type="submit" value="ENVIAR" class="submit">'+ | |
'<div><label for="mc-email"></label></div>'+ | |
'</form>'+ | |
'</div>'); | |
$('#suscribe_frompost').ajaxChimp({ | |
url: "http://altavoz.us7.list-manage.com/subscribe/post?u=7ea0fab70d79a25e6e628427e&id=527aa78fae", | |
language: "es" | |
}); | |
})(jQuery) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment