Question: button click is not working in javascript?
Answer: Most likely, your Remove button isn't in the DOM before you try to attach the click event to it. It is hard to tell from your code snippets, but if the Buy button action hasn't completed successfully, then Remove won't exist. At the point that you attach the click event to Remove, try console logging $("#btnRemove1").