This Code Not Working. Why?

Discussion in 'jQuery' started by black_dockers, Jun 5, 2012.

  1. #1
    puts.php (JSON)


    {
       "image":[
          {
             "name":'<div id="yes">Hi!</div>'
          }
       ]
    }
    Code (markup):

    process.php


    <HTML>
     <HEAD>
      <TITLE> Process </TITLE>
      
     <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.3.2.min.js"></script>
    
     <script> 
    
     function loadPage(){
     
     $(document).ready(function(){
     
     $.getJSON('puts.php', function(JSON){
     $('#result').empty();
    
     $.each(JSON.image, function(i, img){
     $('#result').append(img.name)
       });
     });
     });
     }
    
     function loadEfect(){
     
     $(document).ready(function(){
     
     $('#yes').fadeOut();
     $('#yes').fadeIn();
     });
     }
    
    function start(){
    
     loadPage();
     loadEfect();
    }
     
     </script>
    
     </HEAD>
    
     <BODY onLoad="start()">
    
     <div id="result"></div>
     
     </BODY>
    </HTML>
    Code (markup):
    "process.php" code in the "loadEfect()" function does not work. (fadeIn,fadeOut not working) The page is loaded "loadPage()" function to work, but "loadEfect()" function does not work. Why is this? Where can I made ​​a mistake? Please help.
     
    black_dockers, Jun 5, 2012 IP
  2. black_dockers

    black_dockers Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please Help :(
     
    black_dockers, Jun 5, 2012 IP