Hello I keep getting this error

TypeError: this.getElementsByTagName is not a function

the part of the code that this is refering to is required by my teacher. here is my code that is giving me the problem, I am new to javascript and my teacher is not very helpful so any kind of help is appreciated.


function showSlide(){



var slideList=this.getElementsByTagName("ul")[0];


if((currentSlide!=null)&(currentSlide=slideList)){

closeSlide();}
else{
currentSlide.style.display="block";
timeID=setInterval("moveSlide()",1);


}}



here are the instructions for this part of the code


6. Add the showSlide() function to the file. The purpose of this function is to display a
sliding menu on the Web page. In the first line of the function, create a variable
named slideList that stores an object reference to the first ul element nested within
the current object (as referenced by the this keyword).
7. Add an if statement to the showSlide() function. The purpose of the if statement is to
test whether a sliding menu is currently displayed on the page. If the currentSlide
object is not equal to null and the ID of the currentSlide is equal to the ID of the
slideList variable, then run the closeSlide() function; otherwise, do the following:
a. Run the closeSlide() function.
b. Set the currentSlide variable equal to the slideList variable.
c. Set the display style of the currentSlide variable to block.
d. Run the moveSlide() function repeated at intervals of 1 millisecond. Store the ID
of the timed function in timeID.

again any kind of help is appreciated even if it is to a link that may give me more information than my book.