I've been working on getting a slideshow up and running on my Sharepoint site, but I'm not completely satisfied with the results.
The code snippet causing me trouble is something I found online:
$(xData.responseXML).find("z\\:row").each(function() {
var title = $(this).attr("ows_Title");
var imageLink = imageURL+$(this).attr("ows_FileLeafRef").substring($(this).attr("ows_FileLeafRef").indexOf('#')+1);
var itemLink = itemURL+$(this).attr("ows_ID");
var liHtml = "<div><img width='200' height='200' src='" + imageLink +"'/><p align='center'>"+ title + "</p></div>";
Specifically, I want to style the 'title' variable with a heavier font-weight (500) and reduce the line-height.
I've attempted various solutions without success. I tried assigning an id to the
element in this section of the code:
> var liHtml = "<div><img width='200' height='200' src='" + imageLink
> +"'/><p align='center'>"+ title + "</p></div>";
I then attempted to manipulate that id using jQuery, as well as adjusting the 'title' variable during declaration, but with no luck.
What am I missing as a novice in jQuery?
EDIT
Some additional context that might be helpful:
My understanding of CSS suggests that I can include it in three places: a separate style sheet, in the head of the document, or inline. Due to working within a SP web part, I cannot add anything to the document's head. I tried creating <p id="title_par" align='center'>, then manipulating the $("#title_par").css with jQuery, which didn't work. Inline styling with <p style=""> produced similar results.
So essentially, I don't have access to the .css file (no Sharpoint designer available), only Site Collection admin privileges.