The object does not support the use of the dotdotdot method

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!

Answer №1

Always double-check the file links in your scripts, folks. I made the mistake of linking dotdotdot.js instead of jquery.dotdotdot.js as instructed on the website. Learn from my error and avoid unnecessary complications. A huge thank you to NightOwl888 for setting me straight!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are some ways to optimize jQuery hover for smooth fadeIn/fadeOut effects on several div elements?

Looking for a more efficient way to handle hovering over images and displaying text below? Currently, separate functions are required for each image. Are there ways to streamline this process? The markup for the images (dl and dt) needs to remain the same ...

How to Use CSS to Copy a Style Path and Conceal an Element within an iFrame

My goal is to adjust a division by including a width element in its CSS properties. I have attempted to use Chrome and Firebug to copy the CSS path, but it seems that the result is incorrect. After inserting it into my style.css file, the division remains ...

Generate an array containing the dates of the past 30 days using Moment.js

Currently, I am utilizing momentjs in my project and aiming to generate an array that comprises of the last 30 days. My approach involves creating a counter and subsequently iterating backwards, generating a new moment instance for each day. However, I a ...

Can someone help me transform this LESS code into SCSS?

Currently, I am working on adapting a theme from [www.bootswatch.com][1] that is originally in less format to scss for my rails application. Although I am not well-versed in either SCSS or LESS, I have been researching the variances and have identified so ...

How can I prevent clearQueue() from removing future queues?

In my code, I have a button that triggers the showing of a div in 500ms when clicked. After the div is shown, a shake class is added to it after another 500ms. The shake class is then removed after 2 seconds using the delay function. However, if the user c ...

Guide on displaying the AJAX response within an HTML or JSP element pulled from a database

description of image 1description of image 2How can I display an AJAX response from a database (map) on a JSP screen? I am able to retrieve the response in the browser console but unsure how to visually render it on the JSP page, like in a table or any ot ...

What are some strategies modern internet browsers use to address Sub-Pixel Issues in CSS?

In a vintage article dated from 2008 by the renowned John Resig, the challenges of sub-pixel rendering in older browsers were discussed. An interesting scenario was presented where 4 floated divs, each with a width of 25%, were contained within a parent di ...

Could someone provide an example to illustrate the concept of "em is relative to the font size and % is relative to the parent element"?

Could someone provide an example of how "em is relative to the font size and % is relative to the parent element" works? What exactly do "relative to the font size" and "relative to the parent element" mean? ...

How can I prevent a postback from occurring when using a jQuery dialog with a

$(document).ready(function () { $("#TaskCreatorDivButton").click(function () { $("#taskCreationForm").dialog( { width: "600px" } ); }); }); ...

Looking for help with jQuery's mousemove event. How can I assist you

How's everyone doing? I'm just starting out with jQuery and I'm working on a project where I'm using the mousemove event on a parent element to fade in a div based on the cursor's position. However, I've run into an issue whe ...

Dynamic layout of images with varying dimensions

Discovering the explore section on Flickr was quite intriguing for me: I found it impressive how they showcase pictures in various sizes and how the layout adapts when you resize the browser window. [UPDATE] How do you think one could create a similar di ...

Problem Encountered When Using jQuery addClass on Associated Element

In my code, clicking on an 'a.mainSubMenuLinkA' element successfully triggers a page change. After this, I need to apply the 'active' class to the previously clicked 'a.mainSubMenuHeadingLinkA'. <li><a class="mainSub ...

ASP.Net: Effortless Click Tracking with Advanced Ajax Requests

I am facing an issue with a dataTable retrieved from my database, which has the following structure (excluding unnecessary information like the <th> tag and so on - dataTable dynamically ranges between 50 and 300 entries): <table> <tr data- ...

Can someone please help me convert this jQuery code into vanilla JavaScript?

My Cordova app has an email sending function that utilizes jQuery. During debugging, the ajax function works perfectly in my browser, but once I build the app and test it on my phone, it stops working. I encountered a similar issue before, which was resolv ...

Incorporating Masonry-inspired images into a website's design section

I have been working on incorporating a masonry layout of images into my website, but I am facing alignment issues. The images are simply stacking on top of each other instead of creating the desired masonry effect. Are there any tips on how to create a mas ...

The SignInAsync function is functioning correctly, but unfortunately PasswordSignInAsync is not working as expected

Having some issues with my login and registration using Identity. When I try to register a new account, it logs in fine with SignInAsync, but for some reason, when I attempt to log in from the login page with PasswordSignInAsync, it doesn't work. Bel ...

The collapsed feature of the Bootstrap 4 Navbar is not functioning as

Recently, I delved into the world of Bootstrap 4 and decided to create a collapsing menu. Everything seemed to be working fine when I clicked the button and saw the content display perfectly. However, things took a turn for the worse when I tried to collap ...

Handling TextChanged Event of a TextBox in ASP.NET using C#

I'm currently designing a POS screen that allows barcode scanning directly into a textbox. I want to implement a code behind procedure that adds the barcode-related data to the grid as soon as the textbox text changes. This is how my textbox looks: &l ...

When trying to change the audio source using jQuery, HTML audio is having trouble locating the

In my .html file, I have an audio element that looks like this: <audio id ="captcha"> <source id = "capt_wav" src = "doghouse.wav" type = "audio/wav" > </audio> It successfully plays the audio. However, now I need to dynamically ...

Store the ajax call response in a dynamic function

Currently, I am in the process of creating a series of user-friendly formulas, similar to those found in Excel, for a form builder website. One of the features I have developed is a Lookup function that allows users to specify the value they want and the v ...