I have a snippet of code that keeps putting out an error message. The problem is that the snippet is in JQuery and I do not know that language.
I am told that the problem is with the JQuery's implementation of the $() function, (which is supposed to serve as a universal way to implement a "superset" of the getElementById() function).
I'm not sure how to begin, but the JQuery snippet needs to be recoded into JavaScript using traditional coding like getElementById.
Any suggestions?
Code:
57 $(document).ready(function() {
58
59 $(".signin").click(function(e) {
60 e.preventDefault();
61 $("fieldset#signin_menu").toggle();
62 $(".signin").toggleClass("menu-open");
63 document.forms["loginForm"].elements.loginUser.focus();
64 });
65
66 $("fieldset#signin_menu").mouseup(function() {
67 return false
68 });
69 $(document).mouseup(function(e) {
70 if($(e.target).parent("a.signin").length==0) {
71 $(".signin").removeClass("menu-open");
72* $("fieldset#signin_menu").hide();
73 }
74 });
75
76 });
Thanks.