Not sure why this isn't working, and it's returning as an object/undefined.
I have a variable outside above the doc.ready:
var video_box_original_link = '';
I have a link that I click on inside the ready function which grabs the info fine:
$(document).on('click', '.youtube_video', function(video_box_original_link){
var my_game_name = $('a.game_title_link').attr('name');
var my_game_platform = $('a.game_platform_link').attr('name');
video_box_original_link = "/"+my_game_platform+"/"+my_game_name+"/videos";
});
And I have a function that I'm trying to pass to this which is also in the doc.ready down below:
$(document).on('click', '.popblock_box', function(e, video_box_original_link){
window.history.pushState("vidPage", "vidPopped", ""+ video_box_original_link +"");
}
Is this should be fine?
The "e" is for something else in the script which is not necessary to show.
video_box_original_linkfrom thefunction.