We are available for hire, find out more.

RSS Feed

Making SlideShare Responsive with FitVids.js

By Rach ~ Wednesday, 02 July 2014

It’s really pleasing when an open source bit of software makes it very easy to do a bit extra with it, and solve an urgent problem with a single line of code.

FitVids.js by Chris Coyier and Paravel has long been our go-to solution for responsive videos but for a follow up page for a workshop we facilitated we needed to embed a SlideShare slideshow. The solution was very simple:

<script>
  $(document).ready(function(){
  $("#thing-with-videos").fitVids({ customSelector: "iframe[src^='//www.slideshare.net']"});
  });
</script>

All it needed was the line of code above and voila - that feeling when something just works.