I'm trying to change the value of meta tags with data coming from the database, however they are not populated inside the tags. The value is normally retrieved and displayed inside the script when the view-source is enabled but the content of the meta tag is still empty.
<script type="text/javascript">
$(function(){
$('meta[name="author"]').attr('content','Marcelo de Andrade');
$('meta[name="description"]').attr('content','zzzzzzzzz');
$('meta[name="keywords"]').attr('content','');
});
</script>
<meta name="author" content="" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta property="og:title" content=""/>
<meta property="og:url" content=""/>
<script type="text/javascript">
$(function(){
$('meta[name="author"]').attr('content','<?php echo $owner->name ?>');
$('meta[name="description"]').attr('content','<?php echo $group->elevatorpitch ?>');
$('meta[name="keywords"]').attr('content','<?php echo $group->tags ?>');
$('meta[property="og:title"]').attr('content','<?php echo $group->name ?>');
$('meta[property="og:url"]').attr('content','<?php echo ideas_url($group) ?>');
});
</script>