• Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language
    HTML
  • License
    Other
  • Created about 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A jQuery plugin to lazy load those dang Youtube iframe videos.

lazyYT.js

Description

This is a jQuery plugin to lazy load Youtube videos. On the initial load, the div will be appended by a preview img of the video. On click of the image, the preview img will be replaced by the autoplaying iframe Youtube video.

Intro

To read more information on the plugin and access a demo, view the intro post on newmediacampaigns.com.

Demo

  1. Demo of v1.0.1
  2. View the demo. (older version)

Setup

<div class="lazyYT" data-youtube-id="_oEA18Y8gM0" data-ratio="16:9">loading...</div>
  1. Include the lazyYT JS and CSS files.
  2. Add a div where you want the video to be located. Add the id of the Youtube video to the data attribute youtube-id.
  3. Either add the video width and height to data-width and data-height, or add an ascpent ratio like 16:9 to data-ratio, none are required.
  4. Any optional parameters you wanted passed to the iframe url should be added to data-parameters.
  5. Get it started with $('.lazyYT').lazyYT();

License

(CC) Creative Commons

More Repositories

1

CoverPop

CoverPop is modal splash page plugin that is easily styleable
JavaScript
76
star
2

twitter-most-followed-scripts

Scripts to find the most commonly followed Twitter accounts by a group of people
Ruby
26
star
3

twitter-most-followed-site

Jekyll site to display the results generate by the scripts in the Twitter Most Followed repo.
CSS
7
star
4

civic_aide

A Ruby wrapper to interact with the Google Civic Information API.
Ruby
7
star
5

california-laws-api

API for California's state code. Uses rails-api and Elasticsearch.
Ruby
5
star
6

running-maps

Ruby scripts to generate maps of the most popular running routes in a city
Ruby
5
star
7

congressional-websites-screenshots

Screenshots of the official website for each member of Congress. Accessed with phantomjs on 6/12/2013.
Ruby
4
star
8

durham-crime

Data and scripts for a blog post on mapping crime in Durham
Ruby
3
star
9

trackping

Trackping is a web app to track follows and unfollows for accounts on Twitter.
Ruby
1
star
10

im-currently-reading

App to share what book you are currently reading. Built on Rails and uses the Amazon Product Advertising API.
CSS
1
star
11

california-laws-search-ui

UI for to search California laws
JavaScript
1
star
12

serverless-election-aws

Terraform templates for a multi-region active-active serverless voting setup backed by DynamoDB on AWS
HCL
1
star
13

twitter-bio-analyzer-script

Ruby script to find the most common words in the bios of the accounts a user follows on Twitter
Ruby
1
star
14

best-buddies

A microsite to find who likes your photos the most on Instagram
Ruby
1
star
15

support-map

Rails app with Facebook integration to map supporters in a state/district
Ruby
1
star
16

congress-twitter-most-followed-site

Jekyll website for displaying results about the most commonly followed Twitter accounts by Congress
CSS
1
star