0

i use jquery 1.11 and this code to ajax load wordpress post content in sidebar . everything is good but jquery functions of owl carousel not work and the carousel in post content not showing anything. ajaxify code to load post content:

$(document).ready(function(){
$.ajaxSetup({cache:false});
$(".post-link").click(function(){
    var post_link = $(this).attr("href")+' #content';
    $("#single-post-container").html("loading ...");
    $("#single-post-container").load(post_link);
return false;
});

});

is there any way to solve this problem and conflict? best regards.

Khosravi.em
  • 327
  • 3
  • 16
  • have you tried creating the two functions i posted on my question which seemed to help me http://stackoverflow.com/questions/27802064/how-to-reinitialize-owl-carousel-after-ajax-call/27904194#27904194 – Richlewis Jan 12 '15 at 14:31
  • yes i tried it. but not working. hope you could help me . – Khosravi.em Jan 12 '15 at 15:23

1 Answers1

0

This worked for me :

jQuery(function () {
  jQuery(document).ready(function () {
    setInterval(function () {
      jQuery(".owl-carousel").owlCarousel();
    }, 1500);
  });
});
Rohit Kumar
  • 684
  • 2
  • 17
  • 39