Question: I want the user to input the coordinates of 4 points such as (xa,ya),(xb,yb),(xc,yc),(xd,yd) but all of it at once. I used this code:

> 
> xa=input("Enter x-coordinate for node 1:")
> 
> 
> ya=input("Enter y-coordinate for node 1:")
> 
> 
> xb=input("Enter x-coordinate for node 2:")
> 
> 
> yb=input("Enter y-coordinate for node 2:")
> 
> 
> xc=input("Enter x-coordinate for node 3:")
> 
> 
> yc=input("Enter y-coordinate for node 3:")
> 
> 
> xd=input("Enter x-coordinate for node 4:")
> 
> 
> yd=input("Enter y-coordinate for node 4:")
> 
> 
> 

but in this case I am able to give input value for yd only.
How can I make the user input all the values at once?

Answer: 
You can do that using the [jQuery - insertBefore](http://api.jquery.com/insertbefore/) method.
I have updated your [jsFiddle](https://jsfiddle.net/sjncgaLf/10/)

```
$(document).ready(function() {
  // create elements
  var test = $('<div class = "test">test</div>');
  var el = $('<div class = "el">el</div>');
  // add the first element
  $("body").append(test);
  // insert the second element 
  el.insertBefore(test);
});

```
Based on your update, you just need to edit your variable, not worry about appending data in order.

So for your $markup variable, if it already has data and you want to add your month label at the beginning, just use:

```
$temp = $label + $markup;
$markup = $temp;

```

To add weeks or day data to the end of your $markup variable, just use:

```
$markup = $markup + $day;

```

Once you've got the entire variable built the way you like you can use jQuery to append it where you want.