Currently, I am working on implementing the dotdotdot plugin in my MVC project. Specifically, I am trying to use it within a table to limit certain rows to only displaying 3-4 lines of text. To achieve this, each row and column that may contain lengthy text (over 25 characters) is assigned the following class:
<td>
<div class="longTextColumn">
@Html.DisplayFor(modelItem => item.Reasons_For_Issue)
</div>
</td>
I am utilizing the HTMLHelper class DisplayFor to extract data from my database model. In order to make this work, I have included jQuery 1.8.1 and attached the necessary scripts:
<script type="text/javascript" src="~/Scripts/jquery-1.9.1.js"></script>
<script type="text/javascript" src="~/Scripts/dotdotdot.js"></script>
Additionally, I have set up the function:
<script>
$(document).ready(function () {
$(".longTextColumn").dotdotdot();
});
</script>
Based on the instructions provided, these steps should be sufficient. However, upon loading the page, I notice that the overflow is not hidden, indicating that the script may not be functioning correctly. When investigating using Internet Explorer, an error message appears stating "Object doesn't support property or method 'dotdotdot'." Other browsers do not show any errors, but the desired effect is still not achieved. Can anyone offer insights into why this issue is occurring and provide potential solutions? Thank you in advance!