Here is my jQuery:
jQuery( document ).ready( function ( $ ) {
$('ul li:first-child').addClass( 'first_item' );
var className = $('.first_item').attr('id');
alert('Date is:'+ className +'.');
});
And then this another section of jQuery, that im trying to contrust a variable in:
j(".refreshMe").everyTime(5000, function (i) {
j.ajax({
url: "test.php?latest=" + className + "",
cache: false,
success: function (html) {
j(".refreshMe").html(html);
}
Its this line:
url: "test.php?latest="+className+"",
Im trying to take the className variable and feed it into this line.
Can anyone suggest what im doing wrong here?