"data":[{/literal}{$no_listings},{$no_active_listings},{$no_pending_listings},{$no_expired_listings}{literal}],
<script>
new Chart(document.getElementById("myCharts"),
{"type":"doughnut",
"data":{"labels":["a","b","c","d"],
"datasets":[{"label":"My First Dataset",
"data":[{/literal}{$no_listings},{$no_active_listings},{$no_pending_listings},{$no_expired_listings}{literal}],
"backgroundColor":["rgb(255, 99, 132)",
"rgb(54, 162, 235)",
"rgb(75, 192, 192)",
"rgb(255, 205, 86)"]}]}});
</script>
{literal}{/literal}
выдает ошибку 500, {literal}
<script>
$.ajax({
url: 'useraccount.php',
dataType: 'json',
method: 'post',
success: function(data)
{
var all_views = JSON.parse(data);
// рисуешь диаграмму
new Chart(document.getElementById("myChart"),
{"type":"doughnut",
"data":{"labels":["Red","Blue","Yellow"],
"datasets":[{"label":"My First Dataset",
"data":[0,0,{$total_views}],
"backgroundColor":["rgb(255, 99, 132)",
"rgb(54, 162, 235)",
"rgb(255, 205, 86)"]}]}});
}
});
</script>
{/literal}
$.ajax({
<div style="width:200px;height:200px;display:block;">
<canvas id="myChart" width="200" height="200"></canvas>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>
<script>
$.ajax({
url: 'k.html',
dataType: 'json',
method: 'post',
success: function(data)
{
var all_views = JSON.parse(data);
// рисуешь диаграмму
new Chart(document.getElementById("myChart"),
{"type":"doughnut",
"data":{"labels":["Red","Blue","Yellow"],
"datasets":[{"label":"My First Dataset",
"data":[0,0,'{$total_views}'],
"backgroundColor":["rgb(255, 99, 132)",
"rgb(54, 162, 235)",
"rgb(255, 205, 86)"]}]}});
}
});
</script>
$.ajax({
dataType: 'json',
success: function(data){
}
});
"data":[0,0,'{$total_views}'],
<script>
new Chart(document.getElementById("myChart"),
{"type":"doughnut",
"data":{"labels":["Red","Blue","Yellow"],
"datasets":[{"label":"My First Dataset",
"data":[0,0,'{$total_views}'],
"backgroundColor":["rgb(255, 99, 132)",
"rgb(54, 162, 235)",
"rgb(255, 205, 86)"]}]}});
</script>
<button class="owl-prev"> и <button class="owl-next">
? или как? сейчас кнопки сами появляются .custom-owl-carousel .owl-nav [class*=owl-] {
position: absolute;
top: 50%;
transform: translateY(-50%);
margin-top: -20px;
}
.custom-owl-carousel .owl-nav button.owl-prev {
left: -24px;
}
.custom-owl-carousel .owl-nav button.owl-next {
right: -24px;
}
.owl-theme .owl-nav {
margin-top: 10px;
text-align: center;
-webkit-tap-highlight-color: transparent;
display:none;}
.owl-theme .owl-nav [class*='owl-'] {
color: #FFF;
font-size: 14px;
margin: 5px;
padding: 4px 7px;
background: #D6D6D6;
display: inline-block;
cursor: pointer;
border-radius: 3px; }
.owl-theme .owl-nav [class*='owl-']:hover {
background: #869791;
color: #FFF;
text-decoration: none; }
.owl-theme .owl-nav .disabled {
opacity: 0.5;
cursor: default; }
.owl-theme .owl-nav.disabled + .owl-dots {
margin-top: 10px; }
.owl-theme .owl-dots {
text-align: center;
-webkit-tap-highlight-color: transparent; }
.owl-theme .owl-dots .owl-dot {
display: inline-block;
zoom: 1;
*display: inline; }
.owl-theme .owl-dots .owl-dot span {
width: 10px;
height: 10px;
margin: 5px 7px;
background: #D6D6D6;
display: block;
-webkit-backface-visibility: visible;
transition: opacity 200ms ease;
border-radius: 30px; }
.owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span {
background: #869791; }
<script type="text/javascript">
var jQuery_1_11_3 = $.noConflict(true);
</script>
<script>
$(document).ready(function(){
$(".owl-carousel").owlCarousel({
nav:false,
autoplay : true,
autoplayTimeout : 7000,
loop:true,
margin:5,
items:7,
dots: false,
stagePadding: 50,
responsive:{
0:{
items:1,
nav:true
},
600:{
items:3,
nav:false
},
1000:{
items:5,
nav:true,
loop:false
}
}
});
});
</script>
$('#featured_tab_content').imagesLoaded( function() {
$('#featured_tab_content').masonry({
// options
itemSelector: '.box-container'
});
});