Why does jQuery throw the error `fadeOut is not a function'?

后端 未结 10 869
感情败类
感情败类 2020-12-01 17:59

I am using jQuery and put this code in my javascript:

function HideMe(itemID) {
    var myDiv = \'item_\' + itemID;
    $(myDiv).fadeOut(\"slow\");
}
         


        
10条回答
  •  孤城傲影
    2020-12-01 18:37

    Do you have another javascript library on that page? It seems you have the hide function, and the $ defined (prototype, for example, also has an hide function).
    If that is the case, try:

    jQuery("#item_0").fadeOut("slow");
    

提交回复
热议问题