Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Failing to display alt text on :Hover

  1. #11
    Join Date
    Jul 2012
    Location
    Dorset, England
    Posts
    65
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question Playlist not staying open

    Ah, slight problem, John

    When first going to the www.dorsetdog.com/you-tube-videos, the right hand panel displays the playlists, just as I want it to.

    But when I click on a playlist to open it, the first video in that playlist displays in the player on the left, but the right hand panel goes back to the Playlist view - instead of showing the videos in that opened playlist.

    I don't know if I've put the "ytv-playlist-open" in the wrong place.

    Once I have clicked on the playlist, and the first video is displayed in the player - I have to click on the green button at the top to display the videos in that playlist - instead of the contents of that playlist being automatically displayed on the right.

    youtube-gallery.js

  2. #12
    Join Date
    Jul 2012
    Location
    Dorset, England
    Posts
    65
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    I wonder if I need to display a "Playlist selected - (show title)" between the dorsetdog header and the playlist/video title list. And then change the text on the green button to "Display videos in selected playlist" instead of "Click to see a list of all Dorsetdog videos"

  3. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    Maybe, I don't think so. I think that this code is reused each time the playlist changes. If so, it probably should only include the ytv-playlist-open the first time. I'll have code for that soon.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    OK, here's the new compileList function (back up what you have again first, make the highlighted changes):

    Code:
                    compileList: function(data){
                        if(data && data.feed){
                            utils.ajax.get( utils.endpoints.userInfo(), function(userInfo){
                                var list = '',
                                    user = {
                                        title: userInfo.entry.title.$t,
                                        url: 'http://youtube.com/user/'+userInfo.entry.yt$username.display,
                                        thumb: userInfo.entry.media$thumbnail.url,
                                        summary: userInfo.entry.summary.$t,
                                        subscribers: userInfo.entry.yt$statistics.subscriberCount,
                                        views: userInfo.entry.yt$statistics.totalUploadViews
                                    },
                                    videos = data.feed.entry,
                                    first = true,
                                    i;
                                if(settings.playlist){
                                    user.title += ' · '+(data.feed.media$group.media$title.$t);
                                }
                                list += settings.listfirstline || '<div class="ytv-list-header ytv-playlist-open">';
                                settings.listfirstline = '<div class="ytv-list-header">';
                                    list += '<a href="'+(user.url)+'" target="_blank">';
                                        list += '<img src="'+(user.thumb)+'">';
                                        list += '<span>'+(user.title)+' <i class="ytv-arrow down"></i></span>';
                                    list += '</a>';
                                list += '</div>';
                                
                                list += '<div class="ytv-list-inner"><ul>';
                                for(i=0; i<videos.length; i++){
                                    if(videos[i].media$group.yt$duration){
                                        var video = {
                                            title: videos[i].title.$t,
                                            slug: videos[i].media$group.yt$videoid.$t,
                                            link: videos[i].link[0].href,
                                            published: videos[i].published.$t,
                                            rating: videos[i].yt$rating,
                                            stats: videos[i].yt$statistics,
                                            duration: (videos[i].media$group.yt$duration.seconds),
                                            thumb: videos[i].media$group.media$thumbnail[1].url
                                        };
                                        
                                        var date = new Date(null);
                                        date.setSeconds(video.duration);
                                        var timeSlots = (date.toTimeString().substr(0, 8)).split(':'),
                                            time = timeSlots[1] + ':' + timeSlots[2];
                                        
                                        var isFirst = '';
                                        if(first===true){
                                            isFirst = ' class="ytv-active"';
                                            first = video.slug;
                                        }
    
                                        list += '<li'+isFirst+'><a href="#" data-ytv="'+(video.slug)+'" class="ytv-clear">';
                                        list += '<div class="ytv-thumb"><div class="ytv-thumb-stroke"></div><span>'+(time)+'</span><img src="'+(video.thumb)+'"></div>';
                                        list += '<div class="ytv-content"><b>'+(video.title)+'</b>';
                                        if (video.stats)
                                        {
                                            list+'</b><span class="ytv-views">'+utils.addCommas(video.stats.viewCount)+' Views</span>';
                                        }
                                        list += '</div></a></li>';
                                    }
                                }
                                list += '</ul></div>';
                                settings.element.innerHTML = '<div class="ytv-relative"><div class="ytv-video"><div id="ytv-video-player"></div></div><div class="ytv-list">'+list+'</div></div>';
                                
                                action.logic.loadVideo(first, settings.autoplay);
                                
                                if(settings.browsePlaylists){
                                    utils.ajax.get( utils.endpoints.userPlaylists(), prepare.playlists );
                                }
                                
                            });
                        }
                    }
                },
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Mark Ellis (02-04-2014)

  6. #15
    Join Date
    Jul 2012
    Location
    Dorset, England
    Posts
    65
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Absolutely wonderful.

    Thank you, John Really appreciated

Similar Threads

  1. Replies: 0
    Last Post: 03-07-2011, 09:21 AM
  2. Single display line rotating/scroll text display.
    By acctman in forum Looking for such a script or service
    Replies: 1
    Last Post: 08-04-2008, 03:25 AM
  3. HELP to display 2nd image on mouse hover
    By puffnstuff in forum CSS
    Replies: 1
    Last Post: 04-07-2007, 11:45 PM
  4. IE 6 Hover Display
    By Titan85 in forum CSS
    Replies: 6
    Last Post: 01-18-2007, 05:18 AM
  5. On HOVER display text from somewhere else.
    By madkidd in forum JavaScript
    Replies: 0
    Last Post: 01-24-2006, 08:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •