2016-10-03 3 views
0

レスポンスドロップダウンのjqueryメニューがあります。なんらかの理由で、重複したjqueryライブラリを削除しました。これは、WooCommerceと競合していたため、ドロップダウン対応のメニューが機能していないためです。ここでJQueryレスポンスドロップダウンメニューの問題

私のウェブサイトへのリンクです:あなたはトグルアイコンをクリックすると、あなたが見ることができるようにhttps://www.santa-film.eu/

、メニューが表示されていません。ここ は、jQueryのスクリプトが使用されます。

jQuery.fn.noSelect = function() { 
    var o = "none"; 
    return this.bind("selectstart dragstart mousedown", function() { 
     return !1 
    }).css({ 
     MozUserSelect: o, 
     msUserSelect: o, 
     webkitUserSelect: o, 
     userSelect: o 
    }) 
}; 
var ias = $.ias({ 
    container: ".items", 
    item: ".item", 
    pagination: ".navigation", 
    next: ".nav-previous a" 
}); 
ias.extension(new IASSpinnerExtension), $(document).ready(function() { 
    $(".dod").click(function() { 
     var o = $(this).attr("id"); 
     1 == o ? ($(".menus").hide(), $(this).attr("id", "0")) : ($(".menus").show(), $(this).attr("id", "1")) 
    }), $(".menus").mouseup(function() { 
     return !1 
    }), $(".dod").mouseup(function() { 
     return !1 
    }), $(document).mouseup(function() { 
     $(".menus").hide(), $(".dod").attr("id", "") 
    }) 
}), $(document).ready(function() { 
    $(".rclic").click(function() { 
     var o = $(this).attr("id"); 
     1 == o ? ($(".rmenus").hide(), $(this).attr("id", "0")) : ($(".rmenus").show(), $(this).attr("id", "1")) 
    }), $(".rmenus").mouseup(function() { 
     return !1 
    }), $(".rclic").mouseup(function() { 
     return !1 
    }), $(document).mouseup(function() { 
     $(".rmenus").hide(), $(".rclic").attr("id", "") 
    }) 
}), $(document).ready(function() { 
    $(".report").click(function() { 
     var o = $(this).attr("id"); 
     1 == o ? ($(".reportform").hide(), $(this).attr("id", "0")) : ($(".reportform").show(), $(this).attr("id", "1")) 
    }), $(".reportform").mouseup(function() { 
     return !1 
    }), $(".report").mouseup(function() { 
     return !1 
    }), $(document).mouseup(function() { 
     $(".reportform").hide(), $(".report").attr("id", "") 
    }) 
}), $(document).ready(function() { 
    $(".buscaboton").click(function() { 
     var o = $(this).attr("id"); 
     1 == o ? ($(".buscaformulario").hide(), $(this).attr("id", "0")) : ($(".buscaformulario").show(), $(this).attr("id", "1")) 
    }), $(".buscaformulario").mouseup(function() { 
     return !1 
    }), $(".buscaboton").mouseup(function() { 
     return !1 
    }), $(document).mouseup(function() { 
     $(".buscaformulario").hide(), $(".buscaboton").attr("id", "") 
    }) 
}), $(document).ready(function() { 
    $(".rclic2").click(function() { 
     var o = $(this).attr("id"); 
     1 == o ? ($(".rbuscar").hide(), $(this).attr("id", "0")) : ($(".rbuscar").show(), $(this).attr("id", "1")) 
    }), $(".rbuscar").mouseup(function() { 
     return !1 
    }), $(".rclic2").mouseup(function() { 
     return !1 
    }), $(document).mouseup(function() { 
     $(".rbuscar").hide(), $(".rclic2").attr("id", "") 
    }) 
}); 

だから、正しく作業ダウンそのドロップを取得する方法はありますか?

おかげ

+0

CSSを使用して、ホバー上で開くホバーメニューを作成できます。しかし、javascriptなしでonclick()に依存するメニューを作成することはできません。なぜjqueryを削除するのですか?そしてLoicTheAztecが言ったように、より多くの情報を提供する必要があります。 – helgatheviking

答えて

0

私はインターネットで多くのことを検索し、私はワードプレスとテーマにjQueryの競合のための解決策を見つけました。

だから、私はヘッダからjQueryのタグを削除し、私は私のJavaScriptとjQueryの間の矛盾を避けるために、このコードを使用:このような

 
jQuery.noConflict(); 

(function($) { 

    // Paste your Code Here... 

})(jQuery); 

jQuery.noConflict(); 
(function($) { 
$(document).ready(function() { 
$(".rclic").click(function() { 
    var o = $(this).attr("id"); 
    1 == o ? ($(".rmenus").hide(), $(this).attr("id", "0")) : ($(".rmenus").show(), $(this).attr("id", "1")) 
}), $(".rmenus").mouseup(function() { 
    return !1 
}), $(".rclic").mouseup(function() { 
    return !1 
}), $(document).mouseup(function() { 
    $(".rmenus").hide(), $(".rclic").attr("id", "") 
}) 
}), $(document).ready(function() { 
$(".report").click(function() { 
    var o = $(this).attr("id"); 
    1 == o ? ($(".reportform").hide(), $(this).attr("id", "0")) : ($(".reportform").show(), $(this).attr("id", "1")) 
}), $(".reportform").mouseup(function() { 
    return !1 
}), $(".report").mouseup(function() { 
    return !1 
}), $(document).mouseup(function() { 
    $(".reportform").hide(), $(".report").attr("id", "") 
}) 
}), $(document).ready(function() { 
$(".buscaboton").click(function() { 
    var o = $(this).attr("id"); 
    1 == o ? ($(".buscaformulario").hide(), $(this).attr("id", "0")) : ($(".buscaformulario").show(), $(this).attr("id", "1")) 
}), $(".buscaformulario").mouseup(function() { 
    return !1 
}), $(".buscaboton").mouseup(function() { 
    return !1 
}), $(document).mouseup(function() { 
    $(".buscaformulario").hide(), $(".buscaboton").attr("id", "") 
}) 
}), $(document).ready(function() { 
$(".rclic2").click(function() { 
    var o = $(this).attr("id"); 
    1 == o ? ($(".rbuscar").hide(), $(this).attr("id", "0")) : ($(".rbuscar").show(), $(this).attr("id", "1")) 
}), $(".rbuscar").mouseup(function() { 
    return !1 
}), $(".rclic2").mouseup(function() { 
    return !1 
}), $(document).mouseup(function() { 
    $(".rbuscar").hide(), $(".rclic2").attr("id", "") 
}) 
}); 
})(jQuery); 

私は助けるために、このソリューションを共有します他の人がこの問題を抱えているかもしれません