Last active
March 4, 2020 13:35
-
-
Save yeriepiscesa/712b50153858d75345b7809dd0d2c745 to your computer and use it in GitHub Desktop.
Post Carousel using Oxygen Builder - Kode dari tutorial https://solusipress.com/membuat-post-slider-pada-oxygen-builder-basic/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="<?php echo CT_FW_URI . '/vendor/unslider/unslider.css' ?>"> | |
<script type="text/javascript" src="<?php echo CT_FW_URI . '/vendor/unslider/unslider-min.js' ?>"></script> | |
<script type="text/javascript"> | |
(function($){ | |
$( '.post-sliders .oxy-repeater-pages-wrap' ).remove(); | |
<?php if( !is_admin() ): ?> | |
$( '.post-sliders' ).each( function(){ | |
var the_html = $(this).html(); | |
$(this).replaceWith( $( '<div class="the-sliders"><ul>' + the_html + '</ul></div>' ) ); | |
}); | |
$( '.post-slider-item' ).each( function(){ | |
var the_html = $(this).html(); | |
$(this).replaceWith( $( '<li>' + the_html + '</li>' ) ); | |
}); | |
$(function() { | |
$('.the-sliders').unslider(); | |
}); | |
<?php endif; ?> | |
})(jQuery); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment