What is the proper way to incorporate this jQuery slider plugin into my website?

I've successfully implemented the HTML and CSS, but I'm struggling with inserting the jQuery and plugin correctly. My familiarity with jQuery and JavaScript is limited, so I think I might be placing them in the wrong location, creating confusion for me. Despite its simplicity, I can't seem to get it right.

You can find the code reference that I am working from at this link: http://www.jqueryscript.net/rotator/Infinite-Looping-Scroller-Plugin-With-jQuery-loopmovement.html

Here are the links to the JS files that I have placed at the bottom of my HTML document:

<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="js/jquery.loopmovement.min.js"></script>

<script src="js/jquery.loopmovement.js"></script>

Although the HTML and CSS appear to be correct, nothing seems to be functioning as intended. The elements are not moving as they should. https://i.sstatic.net/DUwST.jpg

Answer №1

$('#box1').loopmovement({
  'direction':'top', 
  'speed':20
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="http://www.jqueryscript.net/demo/Infinite-Looping-Scroller-Plugin-With-jQuery-loopmovement/jquery.loopmovement.css" rel="stylesheet"/>
<script src="http://www.jqueryscript.net/demo/Infinite-Looping-Scroller-Plugin-With-jQuery-loopmovement/jquery.loopmovement.min.js"></script>

<div id="box">
<div id="box1">
<div class="content toLeft"><i class="fa fa-hashtag"></i> This is Item 1</div>
    <div class="content toLeft"><i class="fa fa-hashtag"></i> This is Item 2</div>
    <div class="content toLeft"><i class="fa fa-hashtag"></i> This is Item 3</div>
</div>
</div>

Could you please take a look at the code snippet above?

Answer №2

Here's what I recommend you do:

1 - Start by downloading the necessary JavaScript files from the plugin website.

2 - Create a 'js' folder within your project and save the downloaded files there.

3 - Link these files in your HTML using the standard <script src=""> code snippet.

Following these steps should ensure that your plugin functions correctly.

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

The header background image does not appear on older versions of Internet Explorer, such as ie6, ie7

Could anyone help me understand why the background image in my header is not showing up on IE6, 7, and 8 even with the fallback in place? You can view the issue at Thank you! .wrapper-3 header { background-image: url('../images/.jpg&apos ...

Display the value in Vue.js as a price format while maintaining it as an integer

I have created a Vue component called "formatted-number" which takes in an integer value (e.g. 1234) and currently displays it as a string (e.g. "12.34") to represent a price in a textfield, with the appropriate "," or "." based on the country. However, I ...

Troubleshooting: Firefox not executing AJAX call in onchange function

I have developed a form with a select_tag that includes an onchange function: Form (advertisments/_form.html.erb): <div class="controls advertise-medium-select"> <%= select_tag 'advertisment[medium_id]', options_for_select(@mediums ...

Enhancing the capabilities of jQuery's ajax function

Is there a way to enhance the ajax function to make an image appear on the page every time it is called, indicating that content is loading? I came across the concept of prefilters on http://api.jquery.com/extending-ajax/ which can be used to display the ...

Is it possible to consolidate all CSS and JS links into a single PHP file for easier management?

Having spent years working with spaghetti code in my PHP projects, I've decided to make the switch to Code Igniter to gain experience with an MVC Framework (even though I know it's not as popular now, Laravel/Composer blew my mind). I have an ol ...

Overriding custom CSS with react-bootstrap styles

While attempting to utilize the react-bootstraps accordion component, I encountered the necessity of the import statement import "bootstrap/dist/css/bootstrap.min.css"; in order for the accordion to function properly. However, upon adding this ...

What is the best way to incorporate a list into a jQuery table?

I am looking to populate a table with a list that is returned from the $.ajax function. Below is a snippet of the code I have been working on. $(document).ready(function() { $.ajax({ type: "POST", url: "Home/LoadTable", success: function(data) ...

Compose an email without the need to access the website

Is there a way to send email reminders to users without having to load the website pages? In the reminder section, users can select a date for their reminder and an email will be automatically sent to them on that date without requiring them to access the ...

Unspecified data stored within an object

I am looking to populate a page with data from the server and have the ability to update the information. To achieve this, I am using formbuilder to fetch data from the server as the default value. Here's how I am implementing it: createForm(){ ...

Uncertain about the process of upgrading this chart with the latest array modifications

My code includes a function that updates the data array with user input, which is used to create a bar graph. The issue I am facing is that while the data array in the chart gets updated upon user input, the chart itself does not. How can I ensure that the ...

Transmitting Cookie from JavaScript to PHP

My task involves sending a JavaScript string to my server. I have managed to create a cookie for this purpose, and now I need it to perform a specific action (like a simple echo). Below is the button function I am using with Bokeh: const data = source.d ...

What are the best methods for detecting devices in order to create customized CSS styles for iPad and Galaxy Tab?

Ensuring my web application is compatible with various devices is crucial. While I have created a common CSS for all mobile and tablet devices, it seems to be causing some problems specifically on the iPad. After finding a fix tailored for the iPad, I now ...

Establishing the sizing of an element across various breakpoints

I'm having trouble setting up varying widths based on different breakpoints. For instance, the code below will be used for all breakpoints: <nav class="navbar-nav w-75 ml-md-4"> ... a select element </nav> But how do I enable w-100 for s ...

Using AJAX to upload images to a MySQL database with PHP

I'm interested in experimenting with uploading an image using PHP and MySQL. My approach involves using a form to send data via AJAX. Here is my HTML code: <input type="file" name="logo" id="logo" class="styled"> <textarea rows="5" cols="5" ...

Updating multiple divs with the same class using different values returned from an AJAX success callback in jQuery

Consider a scenario where there is a group of div elements like <div class="size"></div> <div class="size"></div> After an AJAX post request successfully returns the following data. $.each (data, function (bb) { // data is return ...

Bizarre Drop-down Peculiarities

Having a perplexing issue where the 'search' list item is oddly shifted below the dropdown box only when it is displayed. The other list items remain in their correct positions. Any advice on how to resolve this? The appearance and functionality ...

In React, the input is consistently considered 'valid'

I have a React component that looks like this export const SearchBar = ({ searchInput, updateSearchKeyword, }: SearchBarProps) => { const dummy = ""; return ( <div className={`${styles.container} `}> <input c ...

Apply pointer style to the CSS only when a division contains text

If there is plain text inside a div with class="x95qze", how can we add cursor:pointer only to the second div that contains the text Cursor pointer required here. The div with class="x95qze" will not change. The content of the div may ...

"Fixing the Vertical Order of Divs with Jquery: A Step-by-

Before I completely lose my mind, I need some help with a coding issue. Right now, I have two initial divs displayed. The user should be able to add these divs below the original ones as many times as they want, or remove them if needed. I've been att ...

Exploring Javascript through Python using Selenium WebDriver

I am currently attempting to extract the advertisements from Ask.com, which are displayed within an iframe generated by a JavaScript script hosted by Google. Upon manually navigating and inspecting the source code, I can identify the specific element I&ap ...