Skip to main content

How to add Slick Slider multiple

https://codepen.io/vilcu/pen/ZQwdGQ

html

<section class="regular slider">

  <div>

    <img src="http://placehold.it/350x300?text=1">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=2">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=3">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=4">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=5">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=6">

  </div>

</section>


<section class="center slider">

  <div>

    <img src="http://placehold.it/350x300?text=1">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=2">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=3">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=4">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=5">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=6">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=7">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=8">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=9">

  </div>

</section>


<section class="variable slider">

  <div>

    <img src="http://placehold.it/350x300?text=1">

  </div>

  <div>

    <img src="http://placehold.it/200x300?text=2">

  </div>

  <div>

    <img src="http://placehold.it/100x300?text=3">

  </div>

  <div>

    <img src="http://placehold.it/200x300?text=4">

  </div>

  <div>

    <img src="http://placehold.it/350x300?text=5">

  </div>

  <div>

    <img src="http://placehold.it/300x300?text=6">

  </div>

</section>

<h1> CSS </h1>
body{
  background:#ccc;
}
.main {
  font-family:Arial;
  width:500px;
  display:block;
  margin:0 auto;
}
h3 {
    background: #fff;
    color: #3498db;
    font-size: 36px;
    line-height: 100px;
    margin: 10px;
    padding: 2%;
    position: relative;
    text-align: center;
}
.action{
  display:block;
  margin:100px auto;
  width:100%;
  text-align:center;
}
.action a {
  display:inline-block;
  padding:5px 10px; 
  background:#f30;
  color:#fff;
  text-decoration:none;
}
.action a:hover{
  background:#000;
}
<h1>js</h1>
 $('.slider-for').slick({
   slidesToShow: 1,
   slidesToScroll: 1,
   arrows: false,
   fade: true,
   asNavFor: '.slider-nav'
 });
 $('.slider-nav').slick({
   slidesToShow: 3,
   slidesToScroll: 1,
   asNavFor: '.slider-for',
   dots: true,
   focusOnSelect: true
 });

 $('a[data-slide]').click(function(e) {
   e.preventDefault();
   var slideno = $(this).data('slide');
   $('.slider-nav').slick('slickGoTo', slideno - 1);
 });

Comments

Popular posts from this blog

High light Search Result In Wordpress

High light Search Result In Wordpress add this function in your themes function.php function highlight_results ( $ text ) {      if ( is_search ( ) ) { $ keys = implode ( '|' , explode ( ' ' , get_search_query ( ) ) ) ; $ text = preg_replace ( '/(' . $ keys . ')/iu' , '<span class="search-highlight">\0</span>' , $ text ) ;      }      return $ text ; } add_filter ( 'the_content' , 'highlight_results' ) ; add_filter ( 'the_excerpt' , 'highlight_results' ) ; add_filter ( 'the_title' , 'highlight_results' ) ;   function highlight_results_css ( ) { ? > <style> .search-highlight { background-color : #FF0 ; font-weight : bold ; } </style> < ? php } add_action ( 'wp_head' , 'highlight_results_css' ) ;

Redirect In contact form 7

add_action( 'wp_footer' , 'redirect_cf7' ); function redirect_cf7() { ?> < script type = "text/javascript" > document.addEventListener( 'wpcf7mailsent' , function ( event ) { if ( '1377' == event.detail.contactFormId ) { // Sends sumissions on form 947 to the first thank you page location = 'https://www.panelesyceldassolares.com/regreso' ; } else { // Sends submissions on all unaccounted for forms to the third thank you page location = 'https://www.panelesyceldassolares.com/regreso-2/' ; } }, false ); </ script > <?php }

Get Single Product By ID in Opencart

<?php if(!empty($_POST["country_id"])) {     $query ="SELECT * FROM oc_product WHERE product_id = '" . $_POST["country_id"] . "'";     $results = $this->db->query($query);   $query2 ="SELECT * FROM oc_product_description WHERE product_id = '" . $_POST["country_id"] . "'";   $results2 = $this->db->query($query2);   $rowresults2 = $results2->row;   $rowresults = $results->row;   $name1 = $rowresults['model'];   $name2 = $rowresults2['name'];   $name3 = $rowresults['price'];   $name4 = 'Exe.' ?>