Skip to content

Instantly share code, notes, and snippets.

@felquis
Created April 26, 2012 05:10
Show Gist options
  • Save felquis/2496122 to your computer and use it in GitHub Desktop.
Save felquis/2496122 to your computer and use it in GitHub Desktop.
Uma grande gambiarra pra trocar o src das imagens que estavam vindo erradas, já que a as imagens são adicionadas pelo backEnd e ele não estava disponível na hora, eu tive que improvisar por que era urgente kkk deu certo!
// Minha maior gambiarra
$('img').each(function (i, e) {
var $this = $(e),
src = $this.attr('src');
if (src.indexOf('/home/lol/public_html/') != -1){
$(this).attr('src', src.replace('/home/lol/public_html/', ''));
}
});
@suissa
Copy link

suissa commented Apr 26, 2012

mta sapequice uhahhsahuahua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment