I'm trying to replace the page_title div with the content of the name
property. Below is what I have so far but it does not work. I'm new to jQuery any help. I'm using jquery Mobile.
<script>
var siteData = {
"name": "Site Name",
"logo": "",
"theme": "b",
"fullSiteLink": "http://www.google.com",
"pages": [{
"id": "1364668689503",
"name": "Page Title",
"type": "basic",
"components": {
"img": "",
"text": "Page content"
}
},
}]
}
</script>
UPDATE
$(document).ready(function(siteData) {
//site name
$('#page_title').html(siteData["name"]);
});