Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function Imagw(thisvalue) {
- var slideshow = $('#slider-product-template-2');
- theme.slideshows[slideshow] = new theme.Slideshow(slideshow);
- // slideshow.flexslider(6);
- var $newImgs = slideshow.find(
- '.slide[data-img-alt="' + thisvalue + '"]'
- );
- slideshow.find('.slide').removeClass('rt');
- $newImgs.addClass('rt');
- var index = slideshow.find('.rt:eq(1)').attr('data-index');
- slideshow.flexslider(parseInt(index));
- var index_array = []
- slideshow.find('.slide').not('.rt').each(function() {
- index_array.push($(this).attr('data-index'));
- });
- $('.flex-control-thumbs > li').removeClass('rt1');
- $.each(index_array, function(index, value) {
- $('.flex-control-thumbs').find('li:eq(' + parseInt(value) + ')').addClass('rt1');
- });
- theme.slideshows[slideshow] = new theme.Slideshow(slideshow);
- $('.flex-control-thumbs > li').show();
- $('.flex-control-thumbs').find('li:eq(0)').hide();
- $('.rt1').hide();
- }
- $(function() {
- $(document).on('change', 'select', function() {
- var thisvalue = $(this).find("option:selected").text();
- if(thisvalue == "Vanilla" || thisvalue == "Chocolate"){
- Imagw(thisvalue)
- }
- });
- $(".tab button").click(function(){
- var radioValue = $(this).find("input[name='sele']:checked").val();
- if(radioValue == "one-time-purchase"){
- // alert("one-time-purchase");
- var text = $('.'+radioValue).find(".jumpstart-selector select option:selected").text();
- Imagw(text);
- }
- else if(radioValue == "monthly-subscription"){
- // alert("monthly-subscription");
- var text = $('.'+radioValue).find(".jumpstart-selector select.single-option-selector option:selected").text();
- Imagw(text);
- }
- });
- });
- </script>
Add Comment
Please, Sign In to add comment