function goToNav(){ $('.gallery-nav .sub-nav').click(function(e) { e.preventDefault(); var slideno = $(this).attr('data-id'); var getIndex = $(".owl-item .gallery_item[data-group='"+slideno+"']").attr('data-slick-index'); console.log('slideno',slideno,'getIndex',getIndex); setTimeout(function(){ $('.owl-item').slick('slickGoTo', getIndex); console.log('check') },300) }); } $(document).ready(function(){ goToNav() }) $(document).load(function(){ goToNav() })
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter