Problem setting event listeners

Problem setting event listeners

I am starting to experiment in jquery and I am having a problem setting listenters. This is the current state of the code
/**
* @author Charles Russell
*/

rcc.PlaygroundManager=function(){
   showItem = function(){
      debugger;
      $(this).removeClass("collaspe");
      $(this).addClass("expanded");
   };
   return{
      init:function(){
         debugger;
         $("#menu li ul").click(function(event){
            alert("listener executed")
            $(this).removeClass("collaspe").addClass("expanded");
         });
      }
   }
   
}

$(document).ready(function(){
   pageManager = new rcc.PlaygroundManager();
   pageManager.init()
});


I have tried different varients like

$("#menu li ul").bind("mouseover",function(event){
   alert("listener executed")
   $(this).removeClass("collaspe").addClass("expanded");
});


And

$("#menu li ul").bind("mouseover",showItem)


and Thus far nothing has worked I have not even got to the events function. Based upon the samples that I have seen I cannot see what I am doing wrong.
    • Topic Participants

    • cerjr