As a newcomer to website development, I am currently exploring how to dynamically set images in the ul
/li
elements within a div
. Below is a snippet of the HTML code I have been working on:
<div class="results">
<ul class="row">
<li class="template hidden col-md-3">
<div class="image">
<!--img src='broken_file.png'-->
<data>
<span class="name"></span>
<span data-before='faces' class="faces"></span>
<span data-before='genus' class="genus"></span>
<span data-before='vertices' class="vertices"></span>
</data>
</div>
</li>
</ul>
</div>
Furthermore, in another JavaScript file, I am attempting to access the 'image' div using the following:
$(li).find('image').css()
My objective is to insert an image URL within the css()
method, but I am uncertain about the approach or if it is feasible at all.