Catch PHP Output Buffering Data Over jQuery AJAX

From last few day’s I was deeply engaged with Output Buffering. I had to catch PHP output buffering responsive over AJAX request. And now I am here to sharing a sample script to catch PHP output buffering data over jQuery AJAX.

Live Demo

 

How to use fadeIn fadeOut effect in jQuery

jQuery is a Java Script libraries which is very lightweight and “write less, do more” .  It”s is full of built in effect, I am gonna show you very common effect “fadeIn” and “fadeOut” in jQuery.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Untitled Document</title>
    <br/>
    <script type="text/javascript" src="jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
           $(window).load(function(){
               $("#showme").fadeOut(0);
               $("#hideme").click(function () {
                   $("#h2").fadeOut(1000);
                   $("#hideme").fadeOut(1000);
                   $("#showme").fadeIn(2000);

               })
               $("#showme").click(function () {
                   $("#h2").fadeIn(1000);
                   $("#showme").fadeOut(1000);
                   $("#hideme").fadeIn(2000);
               })
           });
        });
    </script>
</head>
<body>
<button id="hideme">Hide Me</button>
<button id="showme">Show Me</button>
<h2 id="h2" style="padding:10px 30px;  background:#EEE; color:#c00; border:1px solid #DDD;">Hide Me</h2>
</body>
</html>

Hope you guys enjoyed it.