简体   繁体   English

为什么PhpStorm不识别$ .post方法?

[英]Why PhpStorm don't recognizes $.post method?

The PhpStorm don't recognizes a $.post method: PhpStorm无法识别$.post方法:

在此输入图像描述

I'm using Jquery 1.9.1! 我正在使用Jquery 1.9.1!

What do I need to setup or what am I doing wrong? 我需要设置什么或我做错了什么?

Here is my menu.js : 这是我的menu.js

(function( Menu, $, undefined ) {
    // propriedade que armazena id do menu
    var menu_id;

    // Métodos públicos
    Menu.init = function(_menu_id) {
        menu_id = _menu_id;

        // preenchendo evento 'tree.move'
        menuObj.bind('tree.move', function(event) {
                var ordem;

                // here i get the changes in 'event' param and put in 'ordem'

                // save
                salvarOrdemItens(JSON.stringify(ordem));
            }
        );
    };

    function salvarOrdemItens(mudancasMenu) {
        // console.log(JSON.stringify(mudancasMenu));
        $.post('/administrativo/menu/salvar-ordem-item/'+menu_id,
                { "mudancasMenus" : mudancasMenu }
        );
    }
}( window.Menu = window.Menu || {}, jQuery ));

I solved my problem: 我解决了我的问题:

"File" > "Invalidate caches" “文件”>“无效缓存”

More info about this command: http://goo.gl/h6IRYB 有关此命令的更多信息: http//goo.gl/h6IRYB

Thanks to @lazyone. 感谢@lazyone。

Invalidating caches didn't work for me but downloading an uncompressed/un-minified version of jQuery and including it in my project did. 无效的缓存对我来说不起作用,但下载未压缩/未缩小版本的jQuery并将其包含在我的项目中。

https://code.jquery.com/jquery/ https://code.jquery.com/jquery/

I also went to the following section in settings and added the uncompressed jQuery file 我还在设置中转到了以下部分,并添加了未压缩的jQuery文件

Settings > Languages & Frameworks > JavaScript > Libraries

将您的公共(public_html,web)文件夹标记为文档根目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM