how to link this Jquery to my html page? https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js can someone help me? Iv been trying but its not working! I need to know exactly how? should I include something between my "head" tags? or body or where exactly?
the code is from code pen: https://codepen.io/anon/pen/YVZQQX?editors=0010
code:
$(".form").find("input, textarea").on("keyup blur focus", function(e) {
var $this = $(this), label = $this.prev("label");
if (e.type === "keyup") {
if ($this.val() === "") {
label.removeClass("active highlight");
} else {
label.addClass("active highlight");
}
} else if (e.type === "blur") {
if ($this.val() === "") {
label.removeClass("active highlight");
} else {
label.removeClass("highlight");
}
} else if (e.type === "focus") {
if ($this.val() === "") {
label.removeClass("highlight");
} else if ($this.val() !== "") {
label.addClass("highlight");
}
}
});
$(".tab a").on("click", function(e) {
e.preventDefault();
$(this).parent().addClass("active");
$(this).parent().siblings().removeClass("active");
target = $(this).attr("href");
$(".tab-content > div").not(target).hide();
$(target).fadeIn(600);
});
It works perfectly in code pen, but when I copy it, it doesn't work! Thank you
<html>**<head>**<title></title><script src="" /><!-- link libs like jQuery -->…</head><body><scrip>/* code calling jQuery */</script></body></html>