Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Mar 2014, 01:12
NukedLT's Avatar
NukedLT NukedLT is offline
 
Join Date: Feb 2013
LazyLoad Youtube BB Code

I've got a number of threads that are predominantly videos, for example a 'Movie Trailers' thread I have the board automatically post to from a youtube RSS feed. It doesn't take many before it starts to crawl. Wrapping them in 'spoiler' tags help, but it's an ugly workaround.

I've got a lazyload concept working, but I'm not too familiar with jquery/javascript and it's very simplistic.

http://www.landthieves.com/board/showthread.php?70130

A single div with the dimensions of the player and the youtube thumbnail set as the background. Clicking the div fires the jquery .html() to insert the youtube iframe which autoplays.

jfiddle: http://jsfiddle.net/9t2q7/13/

I know inline script is frowned upon, especially when redundant, but I'm using the {param} to give the div a unique ID on top of the embed/thumbnail.

Is there a more efficient way of doing this?
__________________
http://www.LandThieves.com
Reply With Quote
  #2  
Old 25 Jan 2017, 08:34
charlesr charlesr is offline
 
Join Date: Aug 2009
Originally Posted by NukedLT View Post

Is there a more efficient way of doing this?
Did you get any further with this?
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
BB Code Enhancements Youtube Subscribe BB code OUTL4W vBulletin 4.x Add-ons 1 22 Nov 2013 21:10
BB Code Enhancements Widescreen Youtube BB Code fattony69 vBulletin 3.7 Template Modifications 10 23 Aug 2009 12:23
BB Code Enhancements Youtube bb channel code ti07shadow vBulletin 3.8 Add-ons 2 21 Jul 2009 09:43



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 17:45.

Layout Options | Width: Wide Color: