What is the most efficient method for designing a sliding list with jQuery?

Recently, I created a sliding list for one of my projects. If you want to see it in action, check it out here.

However, I have been thinking lately if there is a more efficient way to achieve the same result. Maybe something already available in jquery-ui library. Let me know what you think. My main goal is to learn and improve my skills. If there isn't an existing solution, I plan to share this code so others can benefit from it.

<html>
    <head>
        <title>
            test
        </title>

CSS

        <style type="text/css">
            *{
                margin: 0px;
                padding: 0px;
            }
            a.move {
                z-index: 2;
                position: absolute;
                height: 28px;
                width: 28px;
                display: inline-block;
                border: 1px #aaa solid;
                border-radius: 5px;
                background-color: white;
                text-align: center;
                text-decoration: none;
                color: black;
            }
            a.move:hover {
                background-color: #aaa;
            }
            a.move.left {
                top: 0;
                left: 0;
            }
            a.move.right {
                top: 0;
                left: 370px;
            }
            ul#shifting li {
                display: inline-block;
                height: 30px;
                width: 335px;
                border-right: 1px #aaa solid;
                margin-left: 35px;
            }

            div.slidingList_outer{
                z-index: 1;
                position: relative;
                width: 741px;
               ...

        </style>

JQUERY

        <script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
       ...   
      function init(){
          ...
      }
                
   $(function(){
                 ...
            });
        &...
    </head>

HTML

<body>
        <p> ... </p>
        <div class="slidingList_outer">
           ...
        </div>
    </body>
</html>

Answer №1

If it fits your needs, I recommend checking out jQuery Tools Scrollable.

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 Django AJAX jQuery dependent dropdown feature is malfunctioning in the Template

I am currently working on a Django dependent form that functions properly in my create view but encounters issues in the update view. I suspect that the problem lies within the jQuery CDN library, possibly conflicting with the Bootstrap CDN. The AJAX call ...

Rule for jQuery validation based on variables

I am facing an issue with validation of login asynchronously in my HTML form using the jQuery Validation Plugin. I would like to trigger a request for login validity on blur, and validate it upon receiving a response. Below is the code snippet: var login ...

After executing the script, use JavaScript's setAttribute method on the page

I am using a script in HTML: <!DOCTYPE html> <html> <head> <script> function check() { var val = document.getElementById("selectbox").value var pic = document.getElementById(&qu ...

Trouble with $.ajaxSetUp occurring before sending the data

$.ajaxSetup({ beforeSend: function(jqXHR, settings) { if(settings.type == "POST") settings.data = $.extend(settings.data, {test:"One" }); return true; } }); Hello there, I am trying to include the data {test:"One"} in ...

Having trouble with JQuery's $.post function not functioning on your web server?

I'm encountering an issue with my script that uses Ajax to send a request to my PHP file for updating a txt file. Interestingly, the script works perfectly fine on my localhost but fails to work on the webserver. Testing HTML code: <!DOCTYPE html ...

Having trouble with the pagination and search features in DataTables?

I am currently facing an issue with my DataTable that is used to display data from a database. The while loop fetches the data and displays it in a table, but all rows of data from the database appear in the table without any pagination. This means that if ...

"Enhance your listening experience with an audio player featuring album covers as captivating

Is there a way to create an audio player with the album cover image serving as the background, while ensuring all control buttons are displayed on top of that same image? I attempted using the following code snippet: <audio controls = 'controls&ap ...

Utilizing Django's For Loop to Transfer Dropdown Selections to a Modal

I have a dropdown menu with different choices. When a user selects an option, I want a modal to appear with a message specific to the choice made (e.g. "You selected Choice A"). I attempted to use data-target="#myModal{{choice}}" and id="my ...

iPhone 6 (iOS) users may face compatibility issues with iframe and fancy box features

I am currently learning how to use jQuery and the fancybox library. In my Angular 1 and Ionic project, I have successfully implemented fancybox with an iframe. Everything works perfectly on browsers and Android devices, but on iOS, a loader icon appears an ...

An HTML component with no styling or appearance

When using JavaScript to dynamically modify text on a web page, I am running into issues with the text not being inline with other elements such as texts and inputs. I've tried using <div> and <p> but they create new lines and other format ...

What is the proper way to set a margin on a fixed div that has a width

I am looking to create a fixed header that allows the content (body) to scroll underneath it. The challenge arises when the parent element has some margin-right, causing the fixed header to extend beyond the parent's width and occupy 100% of the windo ...

creating a picture within a frame

the code : function DrawFirstRow() { Position = 1; width = 84; height = 84; startX = 28; startY = 28; for (index = 0; index < canvasWidth; index += 28) { /// use += ctx.drawImage(tankImage, (Position ...

What is the best way to enlarge the image to a specific percentage?

Although I have never programmed in HTML or worked on web projects before, I am currently using a git repository where the project is client-server. This means I need to modify the code to suit my requirements, which includes working with HTML. My problem ...

The fullscreen button in Photoswipe is not showing up on mobile devices

After following the instructions from this link, I successfully integrated photoswipe into my website. However, I'm facing an issue where the fullscreen button is not visible on mobile devices, even though it appears on the demo website. Here are so ...

Arranging my pictures through CSS styling

Upon examining my webpage, I've noticed that the images are not properly aligned. My goal is to have the icons perfectly lined up; however, it seems there's a discrepancy depending on another cell, based on the size of the container where the tim ...

Pagination in jQuery EasyUI datagrid does not function properly when using the appendRow method

I have been using the jeasyui datagrid with pagination for a while now, but I recently came across a requirement where I need to add data from a form upon clicking the "Add Data" button. Everything is working perfectly fine, except that the pagination is n ...

Both JOINs are being performed on the identical table

Currently, I am working on a website that displays soccer scores with two teams and two scores stored in my database. Below is the code I am using: <?php $result = mysql_query( "SELECT * FROM resultat LEFT JOIN brukere ON resultat.do ...

I'm having trouble adding two Owl carousels in two separate rows

I am trying to incorporate two owl-carousel sliders on a single HTML page. For example, I want owl-carousel1 in row 1 and owl-carosoul2 in row 2. <div class="item"> <!-- Item Image --> <div cl ...

"Utilizing the power of Codeigniter's HMVC structure

Struggling with an issue and seeking assistance. I have a user list and want to delete a user onclick of the delete button using ajax in CI HMVC. Here is the code snippet from my list view: $(function() { $(".tip-del").click(function() { var r ...

Guide on accessing CGI Script response using AJAX

Greetings, Here is the situation: I'm working on a login form. Once the submit button is clicked, it needs to trigger a CGI script called "someurl?userName=user&password=pwd". Depending on the response from the script, I should be able to navigat ...