Why is my jQuery button handler not being fired?

前端 未结 5 1301
独厮守ぢ
独厮守ぢ 2020-12-22 13:32

I have this jQuery to respond to a button being clicked and call a REST method:

$(document).ready(function() {
    $(\"#btnGetData\").click(function() {
             


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-22 14:11

    Your code works for me: http://codepen.io/danielvaughn/pen/jrNoko

    Are you sure that you're properly importing jQuery? If not, run some jquery functions in your console to make sure it works.

    
    

提交回复
热议问题