S
S
sur_lolidob2015-09-23 13:35:14
HTML
sur_lolidob, 2015-09-23 13:35:14

How to replace image with video in code?

</div>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 html css">
<div class="work-wrapper">

<a class="fancybox-media" title="Image Title Goes Here" href="assets/img/portfolio/2.jpg"> 

<img src="assets/img/portfolio/2.jpg" class="img-responsive img-rounded" alt="" />
</a>

Good day, good people) tell me advice.
How to make the video (youtube) in the window open instead of the picture?!))) I beg you: 3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
beaverBox, 2015-09-23
@beaverBox

So, as offsite says (4. Show youtube clips.):

$("#tip4").click(function() {
  $.fancybox({
      'padding'		: 0,
      'autoScale'		: false,
      'transitionIn'	: 'none',
      'transitionOut'	: 'none',
      'title'			: this.title,
      'width'		: 680,
      'height'		: 495,
      'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
      'type'			: 'swf',
      'swf'			: {
         	 'wmode'		: 'transparent',
        'allowfullscreen'	: 'true'
      }
    });

  return false;
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question