Slick Slider Custom HTML Paging2019 Community Moderator ElectionWhat are valid values for the id attribute in HTML?Convert HTML + CSS to PDF with PHP?Where should I put <script> tags in HTML markup?Retrieve the position (X,Y) of an HTML elementHow to modify the URL without reloading the page?HTML 5: Is it <br>, <br/>, or <br />?How can I refresh a page with jQuery?Redirect from an HTML pageWhy does HTML think “chucknorris” is a color?Cannot display HTML string
How can I get players to stop ignoring or overlooking the plot hooks I'm giving them?
What Happens when Passenger Refuses to Fly Boeing 737 Max?
How to secure an aircraft at a transient parking space?
Why does liquid water form when we exhale on a mirror?
weren't playing vs didn't play
Difference on montgomery curve equation between EFD and RFC7748
Could you please stop shuffling the deck and play already?
Good for you! in Russian
What is the magic ball of every day?
Word for a person who has no opinion about whether god exists
Is it work or heat?
Is compression "encryption" under FCC regs?
Latex does not go to next line
How are showroom/display vehicles prepared?
When stopping and starting a tile job, what to do with the extra thinset from previous row's cleanup?
Do items de-spawn in Diablo?
Virginia employer terminated employee and wants signing bonus returned
Rewrite the power sum in terms of convolution
What wound would be of little consequence to a biped but terrible for a quadruped?
Plausibility of Mushroom Buildings
Child Theme Path Being Ignored With wp_enqueue_scripts
Is it possible to avoid unpacking when merging Association?
Database Backup for data and log files
Can I pump my MTB tire to max (55 psi / 380 kPa) without the tube inside bursting?
Slick Slider Custom HTML Paging
2019 Community Moderator ElectionWhat are valid values for the id attribute in HTML?Convert HTML + CSS to PDF with PHP?Where should I put <script> tags in HTML markup?Retrieve the position (X,Y) of an HTML elementHow to modify the URL without reloading the page?HTML 5: Is it <br>, <br/>, or <br />?How can I refresh a page with jQuery?Redirect from an HTML pageWhy does HTML think “chucknorris” is a color?Cannot display HTML string
Is it possible to create custom paging dots just using HTML for Slick Slider just like Bootstrap Carousel allows you to.
Bootstrap paging example
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
I know you can create custom dots like so;
customPaging : function(slider, i)
var thumb = $(slider.$slides[i]).data('thumb');
return '<a><img src="'+thumb+'"></a>';
But this method doesn't work for what I'm trying to achieve. Here's what I want to be able to use as my paging nav.
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jquery html css slick-slider
add a comment |
Is it possible to create custom paging dots just using HTML for Slick Slider just like Bootstrap Carousel allows you to.
Bootstrap paging example
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
I know you can create custom dots like so;
customPaging : function(slider, i)
var thumb = $(slider.$slides[i]).data('thumb');
return '<a><img src="'+thumb+'"></a>';
But this method doesn't work for what I'm trying to achieve. Here's what I want to be able to use as my paging nav.
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jquery html css slick-slider
add a comment |
Is it possible to create custom paging dots just using HTML for Slick Slider just like Bootstrap Carousel allows you to.
Bootstrap paging example
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
I know you can create custom dots like so;
customPaging : function(slider, i)
var thumb = $(slider.$slides[i]).data('thumb');
return '<a><img src="'+thumb+'"></a>';
But this method doesn't work for what I'm trying to achieve. Here's what I want to be able to use as my paging nav.
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jquery html css slick-slider
Is it possible to create custom paging dots just using HTML for Slick Slider just like Bootstrap Carousel allows you to.
Bootstrap paging example
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
I know you can create custom dots like so;
customPaging : function(slider, i)
var thumb = $(slider.$slides[i]).data('thumb');
return '<a><img src="'+thumb+'"></a>';
But this method doesn't work for what I'm trying to achieve. Here's what I want to be able to use as my paging nav.
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jQuery(document).ready(function($)
$('.step').click(function()
var elem = $(this);
var pointer = $('#pointer');
if( elem.hasClass('one') )
pointer.css('left', '0');
else if( elem.hasClass('two') )
pointer.css('left', '20%');
else if( elem.hasClass('three') )
pointer.css('left', '40%');
else if( elem.hasClass('four') )
pointer.css('left', '60%');
else
pointer.css('left', '80%');
$('.step').removeClass('active');
elem.addClass('active');
);
);
.steps
position: relative;
margin-top: 4rem;
padding-top: 14rem;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
.steps #pointer
position: absolute;
top: 0;
left: 0;
width: 20%;
text-align: center;
-webkit-transition: left 0.3s ease;
-o-transition: left 0.3s ease;
transition: left 0.3s ease;
.steps #pointer svg
width: 10rem;
height: auto;
.steps .step
width: 20%;
text-align: center;
.steps .step svg circle
fill: blue;
-webkit-transition: fill 0.3s ease;
-o-transition: fill 0.3s ease;
transition: fill 0.3s ease;
.steps .step p
font-size: 1.8rem;
font-weight: 600;
color: blue;
opacity: 0;
max-height: 0;
overflow: hidden;
-webkit-transition: max-height 0s, opacity 0.3s ease;
-o-transition: max-height 0s, opacity 0.3s ease;
transition: max-height 0s, opacity 0.3s ease;
.steps .step.active svg circle
fill: lightblue;
.steps .step.active p
opacity: 1;
max-height: unset;
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div>slider here</div>
<div class="steps">
<div id="pointer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68.01 81.14"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path d="M56.73,56a33.13,33.13,0,0,1-2.33,2.41Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #2daae2;"/><path d="M32.52,0C14.56,0,0,15,0,33.56A34.07,34.07,0,0,0,8.27,55.92l0,0,2.33,2.41,0,0L32.52,81.14,54.38,58.4l0,0L56.73,56l0,0A34.07,34.07,0,0,0,65,33.56C65,15,50.48,0,32.52,0Zm0,60.16C18.25,60.16,6.69,48.22,6.69,33.5S18.25,6.83,32.52,6.83,58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16Z" style="fill: #2daae2;"/><path d="M57.71,55.92l-.05,0,.05,0Z" style="fill: #2daae2;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill: #fff;"/><path d="M52.56,33.5c0,11.41-9,20.67-20,20.67s-20-9.26-20-20.67,9-20.68,20-20.68S52.56,22.08,52.56,33.5Z" style="fill:#8dd2f3;"/><path class="cls-4" d="M32.52,54.17c-11.06,0-20-9.26-20-20.67s9-20.68,20-20.68,20,9.26,20,20.68S43.59,54.17,32.52,54.17Z" style="fill: none;"/><path class="cls-4" d="M0,0V81.14H68V0ZM6.69,33.5c0-14.73,11.56-26.67,25.83-26.67S58.36,18.77,58.36,33.5,46.79,60.16,32.52,60.16,6.69,48.22,6.69,33.5Z" style="fill: none;"/></g></g></svg>
</div>
<div class="step one active">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step two">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step three">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step four">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
<div class="step five">
<svg height="40" width="40"><circle cx="50%" cy="50%" r="50%"/></svg>
<p>Sign up</p>
</div>
</div>
jquery html css slick-slider
jquery html css slick-slider
asked Mar 6 at 15:28
ReeceReece
7341925
7341925
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55026650%2fslick-slider-custom-html-paging%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55026650%2fslick-slider-custom-html-paging%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown