开发者

Jquery don't work css function

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("title开发者_开发知识库s2").innerHTML = result;   
            }});
        }, 
        function (e) {
       $(".titles").css("display","none");
        });
     });

Dont work ...


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


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();
        });
     });


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜