I recently started working with angularJS in Brackets and I am attempting to implement a datepicker from https://codepen.io/anon/pen/ZvVxqg
However, when I paste the JS file into my controller.js in Brackets, an error occurs.
Below are the code snippets that I have inserted into my controller.js, but for some reason, it is not functioning correctly:
.controller('reservationCtrl', ['$scope', '$stateParams',
function ($scope, $stateParams) {
$("html").click(function() {
if ($("#icon_calendar").width() != 80) {
ok = 0;
$("#icon_calendar").css({
width: 80,
height: 80,
borderRadius: "18px",
marginLeft: -40,
marginTop: -40,
animation: "bounce2 0.3s",
cursor: "pointer",
transform: "scale(1)"
});
$(".mois").css({ display: "none", fontSize: 14, width: 80 });
$(".days").css({
fontFamily: "'openlight',sans-serif",
display: "none",
backgroundColor: "transparent",
color: "#3C3C3C"
});
$("#month_wrap").css({
backgroundColor: "transparent",
color: "#F05252"
});
$("#month" + mois_choisi).css({ marginLeft: 0, display: "block" });
$("#day" + jour_choisi).css({
position: "absolute",
fontSize: 30,
width: "100%",
display: "block"
});
$(".fleches_mois").hide();
console.log("eee");
}
});
$("body").on("click", "#icon_calendar", function(event) {
event.stopPropagation();
if ($(this).width() == 80) {
ok = 1;
.
.
.
.
.
setTimeout(function() {
$("#day" + jour_choisi).css({
position: "absolute",
fontSize: 30,
width: "100%",
display: "block"
});
}, 10);
}]);
Any assistance would be greatly appreciated.