this is the first time I write in this forum so please tell me if I do something wrong. I can not get this to work, does anyone know what is wrong in the code below. Thanks/
$(document).ready(function(){
$( ".mainSection" ).before( "<div id='overTopnav'></div>" );
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('Nyheter')/items?$select=Title,Body&$filter=Visa eq 'Ja'";,
type: "GET",
headers: {"Accept": "application/json;odata=verbose"},
success: function(data){
//console.log(data);
var items = '<ul id="driftItems">';
$.each(data.d.results, function(){
items +='<li class="driftItem">' + this.Title + this.Body + '</li>';
});
items += "</ul>";
$("#overTopnav").html(items);
},
error: function(driftError){
console.log(driftError);
}
});
});