javascript - Append <span> tag inside of <a> tag using Jquery -
i trying append span tag inside .block-leftnav ul li .parent a
, tag gets added after .parent a
jquery is, adds span tag after every href tag on page.
below code using acheive want:
jquery(document).ready(function() { jquery('.block-leftnav ul li .parent > a').append('<span class="glyphicon arrow"></span>'); });
it simple fix, figured out myself , updated above code. had add ">" before "a" target anchor tags of particular div.
thanks guys prompt response.
$(document).ready(function(){ $('.block-leftnav ul li .parent a').prepend('<span class="glyphicon arrow"></span>'); });
Comments
Post a Comment