<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(function() {
var url="http://www.****.com/***/summer.php";
$.getJSON(url,function(json){
$.each(json.summer,function(i,item){
$('<div class="col-md-4 col-sm-6 col-xs-12 text-center portfolioItemWrapper single-project">' +
'<div class="portfolioItem">' +
'<div class="effect imageWrapper">' +
'<img src="images/genre/'+item.genre+'.jpg" alt="third">' +
'<div class="caption">' +
'<h4 class="oswald">' + item.name + '</h4>' +
'<p class="serifItalic">' + item.subtitel + ' </p>' +
'<a href="single-project.html"><span class="moreText"> + </span></a>' +
'</div>' +
'</div>' +
'</div>' +
'</div>'
).appendTo('#betriebe');
});
});
});
</script>
这里是内容出现的div(但只在mac上,而不是我从服务器调用它时)。
<div class="row gallery js-isotope" id="betriebe" data-isotope-options='{ "itemSelector": ".portfolioItemWrapper"}'>
</div>
提前致谢