jQuery SlideOver - Arranging Divs in a horizontal layout

Currently, I am working on an application wizard that is designed to slide panels in order to display different sections of the resume application. You can view my site here: . The issue I am having is that when you click anywhere on the form, the panels are supposed to slide up but they end up being stacked on top of each other first. Do you have any suggestions on how to fix this problem? I apologize if my question is unclear - I found it difficult to articulate, but I believe the example on the website speaks for itself. Thank you for any assistance you can provide.

I would like to achieve a similar effect as demonstrated in this example: http://jsfiddle.net/jtbowden/ykbgT/2/

Answer №1

What is the issue with this hyperlink?

HTML:

<div id="box-container">
    <div id="item1" class="item">Item #1</div>
    <div id="item2" class="item">Item #2</div>
    <div id="item3" class="item">Item #3</div>
    <div id="item4" class="item">Item #4</div>
    <div id="item5" class="item">Item #5</div>
</div>

CSS:

body {
    padding: 10px;    
}

#box-container {
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;  
}

.item {
    position: absolute;
    width: 50%;
    height: 300px;
    line-height: 300px;
    font-size: 50px;
    text-align: center;
    border: 2px solid black;
    left: 150%;
    top: 100px;
    margin-left: -25%;
}

#item1 {
    background-color: green;
    left: 50%;
}

#item2 {
    background-color: yellow;
}

#item3 {
    background-color: red;
}

#item4 {
    background-color: orange;
}

#item5 {
    background-color: blue;
}

JS:

$('.item').click(function() {

    $(this).animate({
        left: '-50%'
    }, 500, function() {
        $(this).css('left', '150%');
        $(this).appendTo('#box-container');
    });

    $(this).next().animate({
        left: '50%'
    }, 500);
});​

​Just modify the content and you're good to go!​

Answer №2

It appears that floating the container to the left may solve your issue. Give it a try and inform me of the outcome.

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

Error: The URL specified in /accounts/detail could not be found

I encountered an error with the message "NoReverseMatch at /accounts/detail - Reverse for 'upload' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'accounts/upload/(?P\d+)/$']". T ...

Looking for a way to manipulate the items in my cart by adding, removing, increasing quantity, and adjusting prices accordingly. Created by Telmo

I am currently working on enhancing telmo sampiao's shopping cart series code by adding functionality for removing items and implementing increment/decrement buttons, all while incorporating local storage to store the data. function displayCart(){ ...

Determine future dates based on selected date and time

When a user selects a date in the datetimepicker, I want to automatically set three additional dates. The first date will be the selected date + 28 days, the second date will be selected date + 56 days, and the third date will be selected date + 84 days. I ...

I'm curious if there is a specific jQuery event that triggers right before an element loses focus or right before the next element gains focus

I am facing a situation where I have two input elements in a form that are closely connected. The first element triggers an ajax call to check for existing data in the database when the user tries to move away from it, while the second element opens a moda ...

I am endeavoring to send out multiple data requests using a function, ensuring that the code execution occurs only once all the results have been received

After reading through a post on Stack Overflow about handling multiple AJAX calls in a loop (How to take an action when all ajax calls in each loop success?), I was able to come up with a solution. I decided to track the number of requests I needed to make ...

grabbing data from different domains using jQuery

I attempted to implement cross-domain AJAX examples, but unfortunately, it did not function as expected. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta http-equiv="Content-Type" content="text/ht ...

The nested table is overflowing beyond the boundaries of its outer parent table

I have created a nested table, shown below: <table border="0" width="750" cellspacing="0" cellpadding="0"> <tr align="center"> <td width="530"> <table border="0" cellspacing="0" cellpadding="0" width="530"> <tr&g ...

Safari alters the header color on mobile devices

Debugging this issue has been quite challenging - the number at the top of the page appears in white before changing to a dark grey on iPad and iPhones running Safari. Why is this happening?! It functions correctly on all other devices! Check out www.col ...

Having trouble retrieving the Rest Post response using Jquery Ajax post request

When I make a Rest call using the Ajax post method, I encounter the following error or response: {"readyState":0,"status":0,"statusText":"error"} I have enabled cors ($.support.cors = true;) and crossDomain (crossDomain: true (added in headers)). Here ...

Is there a way to make the product list view in Magento much more compact and smaller in size?

My issue is pretty straightforward. I find Magento's product display in list view to be too large for my liking. The images are bigger than necessary and each product takes up too much space. I want to resize the listing so that each product only occu ...

Creating CSS styles to ensure text takes up the largest size possible without wrapping or extending beyond the screen borders

Looking for a way to display text at its maximum size without any wrapping or overflowing the screen? I attempted using @media and adjusting font-size, but things got too complex. My goal is to have the text on example.com displayed at the largest possible ...

Get your hands on large files with ease by utilizing jQuery or exploring alternative methods

Within my User Interface, there exists an Advanced Search section where the user can select from 7 different options as depicted in the diagram. Based on these selections, a web service is triggered. This web service returns search results in JSON format, ...

How can we determine the total character count of a file that has been loaded into a textarea

I have a textarea where I can count the number of characters as I type. function calculateCharacters(obj){ document.getElementById('numberCount').innerHTML = obj.value.length; } <textarea name="textField" id="my_textarea" class="text_edit ...

Utilizing PHP for loading a fresh webpage within a specific div element of an existing page through AJAX

<!doctype html> <head> <title>Homepage</title> <style> #header{background-color:#09C; width:100%; height:100px;} #logoandsearch{background-color:#603; width:400px; height:40px; float:left; margin-top:30px; margin-left:1 ...

Align anchor tag text in the center vertically after adjusting its height using CSS

I'm having trouble vertically aligning the text within an anchor tag that has a height and background color set. The goal is to have equal amounts of space above and below the text, but currently all the extra height is being added below the text. I&a ...

How can JQuery be used to dynamically assign values to Attribute Filters?

My Attribute Filter looks like this: $(’input[name="email"]‘); I am trying to create a function that accepts a parameter containing the attribute name, for example: function test(id_new){ var var_name = $("input[name='"+ ...

Find an XML element that shares a common attribute with another element at the same level

Is there a way to extract the href attribute value from certain nodes based on the presence of another node with a specific attribute? Specifically, I want to retrieve the links from all nodes that come after a span node with the class attribute set to " ...

What is the best way to link styleUrls to a CSS file located in a different directory?

I am trying to include the CSS file src/app/shared/layouts/admin/admin.component.css in my component located at src/app/admin/create-company/create-company.component.ts How can I properly reference this css file in the styleUrls of create-company.componen ...

The sidebar appears to be hovering above the footer section

I am currently working on creating a sidebar that sometimes ends up being longer than the main content section. You can check out my demo here: http://jsfiddle.net/y9hp4evy/1/ and another case here: http://jsfiddle.net/y9hp4evy/2/ (If I add a height to th ...