I'm appending some HTML tags when a user clicks on "like" in feeds section of my website. But it is breaking. I tried with lot of solutions available on the web, but I could not find the solution.
Here is the code I'm using:
$('#feed20').find('strong')
.append('<span original-title="<ul><li>
<a href="http://localhost/forex/profile/username">username</a>
</li></ul>" custom-style="view-more" class="tiply_html_click">1 more</span>');
You need to escape your quotes, try this jsFiddle
$("#feed20").find("strong").append("<span original-title=\"<ul><li><a href='http://localhost/forex/profile/username'>username</a></li></ul>\" custom-style=\"view-more\" class=\"tiply_html_click\">1 more</span>");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With