Hello. i load data from a data.json file. each div named content shows contetn[i] from the json file. but i dont want all of this to be shown. i want only the the hovered div to be shown.but this code doesnt work.any help ?
$.getJSON('data.json', function(data) {
for (var i=0;i<18;i++) {
var content=<div id=\"content\">"+data[i].content+"</div>"
$("#news").append(content);
$("#content").hide();
$("#content").hover(function(){
$("#content").show();},
function(){
$("#content").hide();
} );//end hover
}//end for
});//end json