<div class='tab-container'> <div class='tab-1'> <?php $sql="SELECT * FROM posts WHERE status='tab1'"; echo "<div class='db' <h2>post</h2></div>"; ?> </div> <div class='tab-2'> <?php $sql="SELECT * FROM posts WHERE status='tab2'"; echo "<div class='db' <h2>post</h2></div>"; ?> </div> </div>
<script type="text/javascript"> $(function() { $(".restore").click(function(){ var element = $(this); var del_id = element.attr("id"); var info = 'id=' + del_id; if(confirm("Move this post?")) { $.ajax({ type: "GET", url: "restorepost.php", data: info, success: function(){ } }); $(this).parents(".db").animate({ backgroundColor: "#fbc7c7" }, "fast") .animate({ opacity: "hide" }, "slow"); } return false; }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)