I am attempting to insert a span tag inside .block-leftnav ul li .parent a
, however, instead of adding the tag after only the .parent a
, jQuery is adding the span tag after every href tag on my page.
Below is the code I am using to achieve my desired outcome:
jQuery(document).ready(function() {
jQuery('.block-leftnav ul li .parent > a').append('<span class="glyphicon arrow"></span>');
});
I was able to find a simple solution myself and updated the code above. All I needed to do was add ">" before the "a" in order to specifically target the anchor tags within that particular div.
Thank you all for your quick assistance!