Skip to content

Instantly share code, notes, and snippets.

@mkv27
Last active May 26, 2016 20:55
Show Gist options
  • Save mkv27/403874e1b8382a9353d8b172af3f466f to your computer and use it in GitHub Desktop.
Save mkv27/403874e1b8382a9353d8b172af3f466f to your computer and use it in GitHub Desktop.
Create code inread
(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&amp;id=527aa78fae",
language: "es"
});
})(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment