I’m trying to add some HTML to a class…any ideas why below isn’t working?
JQUERY:
$("ul#breadcrumbs li[media='print']").append("<strong>Hello</strong>");
HTML:
<ul id="breadcrumbs">
<li class="">
<a href="supporting-overview.html">Supporting Units</a>
</li>
<li class="">
<a href="literacy-and-learning.html">Language of geography</a>
</li>
<li class="active">
<a href="literacy-and-learning.html">literacy and learning</a>
</li>
</ul>
The selector
ul#breadcrumbs li[media='print']looks for anliwith attributemediathat has the valueprinte.g.<li media='print'>. There is no suchliin your html so no selection is made and no element appended.