0

At the time of loading the page with ajax and display the html with javascript there is I insert the css but it does not work.

    $(document).ready(function(){
    $(".potot").hover(
            function (e) {
            $(".titles").css("display","block");
            $.ajax({url:"title/title.php?n="+this.id,success:function(result){
            id("titles2").innerHTML = result;   
            }});
        }, 
        function (e) {
       $(".titles").css("display","none");
        });
     });

Dont work ...

2
  • 1
    show() and hide() are your friends :)
    – alex
    Jul 14, 2011 at 5:04
  • 1
    wat id("titles2").innerHTML = result; this represent..
    – K6t
    Jul 14, 2011 at 5:05

3 Answers 3

3

What is id("titles2") referencing? do you mean to use $('#titles2').href(result);?

1

try this code-

$(document).ready(function(){
    $(".potot").hover(
            function (e) {
           // $(".titles").css("display","block");
              $(".titles").show();
              $.ajax({url:"title/title.php?n="+this.id,success:function(result){
            //id("titles2").innerHTML = result;  
              $("#titles2").html(result); 
            }});
        }, 
        function (e) {
       //$(".titles").css("display","none");
          $(".titles").hide();
        });
     });
0

Thanks very much Jon Erickson and Vivek, I've got the solution above problems.

"Wrong Function "

$(".potot").hover(

"Change With "

$(".potot").live("hover",function(e){

Maybe someday I will need help from you, thank you for the answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.