So funktioniert alles bis auf das es bei der ersten lightbox (colorbox) öfnet es zweimal das slider-menu einbinden, geht man eins weiter un wieder zurück ist es nur einmal da
Code:
<script type="text/javascript">
jQuery(document).ready(function(){
$(document).bind('cbox_complete', function(){
var e = document.querySelectorAll('.content-slider, .slider-control'), c, i;
for (i=0; i<e.length; i+=2) {
c = e[i].getAttribute('data-config').split(',');
new Swipe(e[i], {
// Put custom options here
'auto': parseInt(c[0]),
'speed': parseInt(c[1]),
'startSlide': parseInt(c[2]),
'continuous': parseInt(c[3]),
'menu': e[i+1]
});
}
});
$(".layout_merch a").colorbox({
rel: $(this).attr("data-lightbox"),
inline: true,
fixed: true,
width: '100%',
height: '100%',
maxWidth: '100%',
maxHeight: '100%',
dataType: "html",
onLoad: function() {
$.ajax({.......
var e = document.querySelectorAll('.content-slider, .slider-control'), c, i;
for (i=0; i<e.length; i+=2) {
c = e[i].getAttribute('data-config').split(',');
new Swipe(e[i], {
// Put custom options here
'auto': parseInt(c[0]),
'speed': parseInt(c[1]),
'startSlide': parseInt(c[2]),
'continuous': parseInt(c[3]),
'menu': e[i+1]
});
}
}
});
}
});
});
</script>
Lesezeichen