Return $.get data in a function using jQuery

前端 未结 6 1349
臣服心动
臣服心动 2020-11-29 20:29

I\'m trying to call a function that contains jQuery code. I want this function to return the results of the jQuery statement. It is not working, and I\'m trying to figure ou

6条回答
  •  广开言路
    2020-11-29 21:11

    This is the wrong way to do. The function(data) is a call back function so whenever return $.get will execute .. there is possibility that call back function would have not been called.

    Better you call your post data get function from function(data) method.

提交回复
热议问题