The following selector $('.sub_menu_container',this) has 2 parameters, the selector you want to search for and a second one. In this case its this. What is the use of adding that second parameter? Ive search the jquery docs but didnt find anything that could help me. Is it some kind of reference?
The following selector $(‘.sub_menu_container’,this) has 2 parameters, the selector you want to search for
Share
the second param provides the context in which to search the element matched by the first selector