Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ajaxLoadVideo(params)
- {
- $('#categoryDataList').show();
- $('#blogIndex').hide();
- $('#videoList').removeClass('blog-slider');
- $.ajax({
- url: '/api/test',
- method: 'GET',
- data: params,
- dataType: 'json',
- success: function(res) {
- $('#categoryDataList .group-heading h3 a').empty().html(res.category.name);
- $('#categoryDataList .group-desc').empty().html(res.category.desc);
- var _listHTML = '';
- videos = res.videos;
- for (i = 0; i < videos.length; i++) {
- _listHTML += '<div class="blog-item">';
- _listHTML += '<div class="blog-image">';
- _listHTML += '<a href="/blog/' + videos[i].slug + '" title="' + videos[i].video_title + '">';
- _listHTML += '<img alt="' + videos[i].video_title + '" src="/uploads/thumbnail/320_' + videos[i].video_picture + '">';
- _listHTML += '</a>';
- _listHTML += '</div>';
- _listHTML += '<div class="caption">';
- _listHTML += '<a class="blog-list-video-title" href="/blog/' + videos[i].slug + '" title="' + videos[i].video_title + '">' + videos[i].video_title;
- _listHTML += '</a>';
- _listHTML += '</div>';
- _listHTML += '<div class="blog-metas">';
- _listHTML += '<span class="blog-views">' + addCommas(videos[i].video_koview) + ' views</span>';
- _listHTML += '</div>';
- _listHTML += '</div>';
- }
- $('#videoList').empty().html(_listHTML);
- var owl = $("#videoList");
- owl.owlCarousel({
- loop:false,
- navRewind:false,
- margin:10,
- nav:true,
- dots:false,
- navText: '',
- responsive:{
- 0:{
- items:1
- },
- 600:{
- items:3
- },
- 1000:{
- items:5
- }
- }
- });
- $('#videoList').addClass('blog-slider');
- }
- });
- }
Add Comment
Please, Sign In to add comment