0

This question already has an answer here:

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:

jQuery(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;
});

});

How can i use .ajaxcomplete() function to load owl carousel after ajax load post. best regards.

marked as duplicate by cybmeta, fuxia Jan 12 '15 at 21:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

The reason you cannot use this by default is because of no conflict.

From the Codex:

The jQuery library included with WordPress is set to the noConflict() mode (see wp-includes/js/jquery/jquery.js). This is to prevent compatibility problems with other JavaScript libraries that WordPress can link.

In the noConflict() mode, the global $ shortcut for jQuery is not available, so you can still use:

jQuery(document).ready(function($){
    $.ajaxSetup({cache:false});
    ...
});

Read More in Codex

Not the answer you're looking for? Browse other questions tagged or ask your own question.