Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why PhpStorm don't recognizes $.post method?

The PhpStorm don't recognizes a $.post method:

enter image description here

I'm using Jquery 1.9.1!

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

Here is my 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 ));
like image 715
cbacelar Avatar asked Oct 02 '13 14:10

cbacelar


1 Answers

Invalidating caches didn't work for me but downloading an uncompressed/un-minified version of jQuery and including it in my project did.

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

I also went to the following section in settings and added the uncompressed jQuery file

Settings > Languages & Frameworks > JavaScript > Libraries
like image 134
Carlton Avatar answered Oct 04 '22 09:10

Carlton