Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - append meta to the head with js variable

0 votes
added Dec 17, 2020 in jQuery by lcjr Second Warrant Officer (3,820 points)
$(window).load(function() {
	var imgDesc = $('.qa-q-view-content img').attr('src');
	// console.log(imgDesc); 
	$('head').append('<meta property="og:image" content="' + imgDesc + '">');  


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.