Here's my simple jQuery code in which is used to hide/show a dynamic element
$('.network').click(function() {
if($("a[data-network='all']").hasClass('active')) {
if($(this).data("network") !== "all") {
var network = $(this).data('network');
switch(network) {
case "fb":
$(".facebook").hide("slide", { direction: "up" }, 2000);
break;
case "tw":
break;
case "all":
break;
}
}
}
});
When running the click()
function it's pushing Uncaught TypeError: Property '#<Object>' of object #<Object> is not a function
to the console.log
The error is coming from this line
$(".facebook").hide("slide", { direction: "up" }, 2000);