Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'll describe what I'm trying to accomplish and if it seems that my method is dumb please feel free to let me know:

I have a page with a video gallery and a flash video player iframe. When the user clicks on a video thumbnail, it starts to play in the frame.

Users can also go to the page with a specific video loaded into the iframe by appending the filepath to the end of the url - blabla.com/videogallery?videofilepath. I set this up so that videos could be shared easily.

I want to be able to add Share buttons for facebook/twitter, but I cannot get them to work and present themselves properly with the correct metadata (image and title).

So I was thinking of putting the Share buttons in the player iframe as well and then update the metadata tags dynamically when a video change occurs, but am unsure as to how to go about this.

Any help would be much appreciated, thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

You wanna do something like this in the code for jQuery

$(document).ready(function(){
    $('title').text("Your new title tag here");
    $('meta[name=description]').attr('content', 'new Meta Description here');
});

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...