I am using a slider which is loaded regular $(document).ready(function () {}
but on some Pages I have to reload the script with $(document).ajaxComplete(function() {}
too.. Means both has to be called.
The Problem is that ajaxComplete is loading anytime I press any Button with Javascript Action.
I am calling the Javascript twice with
$(document).ready(function() {
$('.owl-carousel').owlCarousel({
items:5,
lazyLoad:true,
loop:true,
margin:10,
responsiveClass:true,
dots: false,
}
and with
$(document).ajaxComplete(function() {
$('.owl-carousel').owlCarousel({
items:5,
lazyLoad:true,
loop:true,
margin:10,
responsiveClass:true,
dots: false,
}
on the same Content because I have to load the ajaxComplete if I change a value.
Can I call ajaxComplete if a Class exist or what is a better way?
There is a <select>
with dynamic values on special pages, after user change the value of select than I have to rebuild it.