$(document).ready(function(){
$('.data-encerramento').each(function (){
var $this = $(this);
var timestamp = $this.html();
var a = new Date( timestamp * 1000);
var months = ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = a.getDate();
var time = date + ' ' + month + ' ' + year;
alert($this.html());
$this.html(time);
});
});
I have this code and the $ error. I need to put this snippet in a wordpress post.
I do not have access to ftp, ti people do not release files.
I can not edit the theme.
How would you make this code in javascript only ???