All,
Very very new to jQuery, so forgive me in advance if this is a simple question.
I'm trying to build a single page web app using jQuery, jQTouch and, obviously, HTML. Right now, at a stage where I'd like to pull in content from a Wordpress site. I have been reading up and playing with the capabilities of jQuery to accomplish this, and I've been able to work through some of the examples, but I'm having a hard time getting this to work for my specific feed.
I'm using the code below -- trying, right now, to get the results to display in a DIV I've named "clicks". Can someone point me in the right direction, or explain why this isn't working?
Thanks!
- <script type="text/javascript">
$.getJSON('http://www.solidverbal.com/category/clicks?feed=json', function(data) {
var items = [];
$.each(data, function(key, val) {
items.push('<li id="' + key + '">' + val + '</li>');
});
$('<ul/>', {
'class': 'my-new-list',
html: items.join('')
}).appendTo('#clicks');
});
</script>