[Solved] jQuery converted codes wont work [closed]


You’re not using the correct selectors. The original code has this:

document.getElementById( 'open-button' )

Which identifies an element with the id “open-button”. The new code has this:

open_menu = $( '.open-button' )

Which identifies an element (or set of elements) with the class “open-button”. To use an id you need to use a #:

open_menu = $( '#open-button' )

There are likely to be further problems, but starting from this problem nothing else will work as expected…

2

solved jQuery converted codes wont work [closed]