Why doesn't PhpStorm recognize the $ .post method?

PhpStorm does not recognize the method $.post:

enter image description here

I am using jQuery 1.9.1!

What do I need to configure or what am I doing wrong?

Here is mine 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 ));
+4
source share
3 answers

I solved my problem:

File> Invalid Caches

More on this command: http://goo.gl/h6IRYB

Thanks @lazyone.

+3
source

Invalid caches did not work for me, but downloaded the uncompressed / non-minified version of jQuery and included it in my project.

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

I also moved on to the next settings section and added an uncompressed jQuery file

Settings > Languages & Frameworks > JavaScript > Libraries
+3

(public_html, web) .

0

All Articles