Below is the JQuery function that I have implemented. I am looking to add a CSS style to the "Read More" and "Read Less" text within the function. Can anyone guide me on how this can be achieved?
$(document).ready(function() {
$('.YourName').jTruncate({
length: 25,
minTrail: 0,
moreText: "Read More",
lessText: "Read Less",
ellipsisText: "...",
});
});
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://tester3.yolasite.com/resources/javascript/jtruncate.js"></script>
<p class="YourName">Hello, Text will truncate after 25 characters and a "Read More" link will be appended to it. Here is some more text. Here is some more text. Here is some more text. Here is some more text. Here is some more text. Here is some more more text. Here is some more text. Here is some more text. This is the end.</p>