将数据从一个div传递到另一个div而不使用隐藏控件

问题描述:

I have a php template in word press. On page load it is showing first div and hiding another (shown in script below) and on click of another button in first div it is hiding itself and showing the hidden div. From the first div ,i have entered values (in its fields)and on second div also i have entered values . At the submit of the last div i want to store values of all the values in a table .

<script>
jQuery(document).ready(function(){

jQuery(".upload").hide();
jQuery(".order").show();

   jQuery(".order-btn").click(function(){
       jQuery(".order").fadeOut(1000);
       jQuery(".upload").fadeIn(1000);

   });

 });
</script> 

You should wrap all your dives into <form> tag and than you'll be able to get values in form-action page, or if you use Ajax, then, you'll just serialize your form and sent in request to action page, the result will be the same.

Also please separate your Js files from template and use <link> tag to add it in html document.