JSFiddle - React, Tailwind, and code Playground
by LyndseyB
HTML
<script src="http://kfceurope.com/wp-content/plugins/ml-slider/assets/sliders/responsiveslides/responsiveslides.min.js?ver=2.8.1"></script>
<div style="width: 100%; margin: 0 auto;" class="metaslider metaslider-responsive metaslider-8 ml-slider">
<div id="metaslider_container_8">
<ul id='metaslider_8' class='rslides'>
<li><img src="http://kfceurope.com/wp-content/uploads/2014/06/Israel-2525x680.png" height="700" width="2600" alt="" class="slider-8 slide-126" /><div class="caption-wrap"><div class="caption"><h1>KFC FRANCHISE IN CENTRAL AND EASTERN EUROPE</h2> <a href="http://kfceurope.com/apply-online/"><img src="http://www.kfceurope.com/wp-content/themes/kfc/core/images/apply-button-with-text.png"/></a>
</div></div></li>
<li style='display: none;'><img src="http://kfceurope.com/wp-content/uploads/2014/06/Israel-Slider-2-2525x680.png" height="700" width="2600" alt="" class="slider-8 slide-125" /><div class="caption-wrap"><div class="caption"><h1>KFC FRANCHISE IN CENTRAL AND EASTERN EUROPE</h2> <a href="http://kfceurope.com/apply-online/"><img src="http://www.kfceurope.com/wp-content/themes/kfc/core/images/apply-button-with-text.png"/></a>
</div></div></li>
</ul>
</div>
</div>
CSS
/* CSS Rules: Sorted alphabetically for better organization. */
/* =Reset CSS (v2.0) http://meyerweb.com/eric/tools/css/reset/
-------------------------------------------------------------- */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
border: 0;
font-size: 100%;
font: inherit;
margin: 0;
padding: 0;
vertical-align: baseline;
}
/*HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
button, input, select, textarea {
font-size: 100%;
overflow: visible;
margin: 0;
vertical-align: baseline;
width: auto;
}
textarea {
overflow: auto;
vertical-align: text-top;
}
/* =Horizontal Rule
-------------------------------------------------------------- */
hr {
background: #dddddd;
border: none;
clear: both;
color: #dddddd;
float: none;
height: 1px;
width: 80%;
margin: 2em auto;
}
hr.space {
background: #ffffff;
color: #ffffff;
}
/* =Base
-------------------------------------------------------------- */
html {
height: 100%;
}
body {
-moz-font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
color: #555555;
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size: 14px;
font-smoothing: antialiased;
line-height: 1.5em;
text-rendering:...
JavaScript
var caption = $('.caption-wrap'),
li = caption.parent('li'),
captionWidth = caption.outerWidth(),
captionLeft = caption.offset().left,
captionPos = parseInt(captionLeft) + captionWidth;
caption.hide().css('marginLeft', '-' + (captionPos) + 'px').show();
li.hover(function() {
caption.animate({ marginLeft: 0 });
}, function() {
caption.animate({'marginLeft' : '-' + (captionPos) + 'px'});
});
$('#metaslider_8').responsiveSlides({
timeout:3000,
pager:false,
nav:false,
pause:true,
speed:600,
prevText:"<",
nextText:">",
auto:true
/* before: function() {
caption.css('marginLeft', '-' + (captionPos) + 'px');
},
after: function() {
li.hover(function() {
caption.animate({ marginLeft: 0 });
}, function() {
caption.animate({'marginLeft' : '-' + (captionPos) + 'px'});
});
}*/
});