JavaScript Append Cloned Div to right side of original element, slide left, then remove original

I am creating an ajax slider with only the one "slide" thats data reloads during slide.

My current method is to animate the absolute positioned element out of parent viewport, jump to right hand side of viewport and slide back in. This gives the illusion of the element sliding.

I have an idea of cloning the slide and appending it to the right hand side of the original element, animating left so clone is in view and the removing the original element.

I have got as far as creating the clone and removing original but am unsure of how to append the clone to the right hand side of original element. Any thoughts on how to do this would be appreciated.

HTML STRUCTURE

<!-- Relative Parent -->
<div id="gameBoxWrap">

    <!-- The Slide -->
    <div class="gameBox">

        <div class="gameBoxContent">
            <!-- Have removed content for readability -->
        </div>

    </div>  
</div>

CSS

#gameBoxWrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 700px; 
}

.gameBox {
  position: absolute;
  top: 2px;
  left: 1px;
  width: 938px;
  height: 690px;
  padding: 20px;
}

JS

//
// CREATES A CLONE OF ELEMENT - I am trying to append the clone to the right hand side of the original element

var $el = $('.gameBox');
$el.clone(true).appendTo('#gameBoxWrap');

//     The current settings below are as follows:
//
//      1. Slide Element out of relative parent viewport
//      2. Jump Element to right hand edge of parent viewport
//      3. Slide Element to orignal position
//
//
//      My thought pattern for ideal process
//
//      1. Wait for clone to be appended on right hand side
//      2. Slide left so Original Element is out of viewport
//      3. Remove Orginal Element

var settings = 
[
    [     {"left": "-950px"},{duration: 400,complete: function() {$(this).css("left", window.innerWidth + $(this).width());}}     ],
    [     {"left": "1px"}, {duration: 400}    ]
];

$(".gameBox").queue("_fx", $.map(settings, function(options, i) {
  return function(next) {
    return $(this).animate.apply($(this), options).promise().then(next);
  };
})).dequeue("_fx");


// REMOVES ORIGINAL ELEMENT
$el.remove();
Answer:1

What tag is counted in form.elements? <html> <head> <title> form process </title> <script> function showelements() { ...

What tag is counted in form.elements? <html> <head> <title> form process </title> <script> function showelements() { ...

I am trying to load data in JSONStore using loadData method, but it is only loading single record in store. Here is code snippet var myRecord = Ext.data.Record.create([ { name: 'Rid', ...

I am trying to load data in JSONStore using loadData method, but it is only loading single record in store. Here is code snippet var myRecord = Ext.data.Record.create([ { name: 'Rid', ...

  1. extjs jsonstore load data
  2. extjs store loaddata
  3. extjs store loaddata callback
  4. extjs store loaddata not working
  5. extjs store loaddata example
  6. extjs store loaddata event

My Website here I have a page About Us due to lack of content we can not cover the complete height of the screen. And my footer starts floating in the air.. I tried doing it using min-height in a ...

My Website here I have a page About Us due to lack of content we can not cover the complete height of the screen. And my footer starts floating in the air.. I tried doing it using min-height in a ...

  1. make body height 100
  2. make body height of content
  3. make body height 100 css
  4. make height of body css
  5. bootstrap make body height 100
  6. css make body height of window
  7. html make body height 100
  8. make div body height
  9. make div fill body height

I want to pass values to jquery plugin function. This is my plugin: (function ( $ ) { $.fn.myplugin = function(name,value) { alert(name + " , " + value ) }; }( jQuery )); And this ...

I want to pass values to jquery plugin function. This is my plugin: (function ( $ ) { $.fn.myplugin = function(name,value) { alert(name + " , " + value ) }; }( jQuery )); And this ...

  1. send params jquery
  2. send parameters ajax jquery
  3. send parameters post jquery
  4. send request parameters jquery
  5. send query parameters jquery
  6. send parameters with jquery
  7. send params ajax jquery
  8. send parameters in url jquery
  9. send parameters to dialog jquery
  10. send parameters in get request jquery
  11. send get parameters ajax jquery
  12. send parameters in post request jquery
  13. jquery send parameters to click
  14. send multiple parameters ajax jquery
  15. jquery send parameters to controller
  16. jquery send parameters get
  17. send two parameters jquery
  18. send parameters to function jquery