Wednesday, 11 September 2013

Add CSS styling to output jquery

Add CSS styling to output jquery

I am working on my JQuery mobile app for my blog and trying to add a bit
of css to the blog output.
I have the following custom js code:
function listPosts(data) {
var output='<ul data-role="listview" data-filter="true">';
$.each(data.posts,function(key,val) {
output += '<li>';
output += '<a href="#bpost" onclick="displayPost(' + val.id + ')">';
output += '<h3>' + val.title + '</h3>';
output += '<span class="ui-li-count">' + val.comment_count + '</span>';
output += '<p class="postedon" >Posted on ' + val.date.substring(0,10) +
The class="postedon" as a css style to change the date output color to Red
but the problem I am having is both the dates and the text 'Posted on' are
showing Red.
How do I style this to avoid the text 'Posted on' color been changed to Red.

No comments:

Post a Comment