Issue with Registering js

Hi guys

i have this following js in my project under folder


src[/src]


[code]

$(function(){

//load the current page with the conten indicated by 'value' attribute for a given button.

    $(modalButton).on('click', '.loadMainContent', function(){

        $('#main-content').load($(this).attr('value'));

    });

});



its a simple code to open form in modal

when i tried to register that js

all the other plugins in my project stopped working

name of that js is


modal.ajax.js

If someone have any idea than let me know what is the problem here

thank you

Do it via asset bundle that depends on JQuery: http://www.yiiframework.com/doc-2.0/guide-structure-assets.html