Skip to content

JS not executed in browser, UJS not working!  #387

@dzonekl

Description

@dzonekl

Hi,

Rails: 4.0.8
jquery-rails (3.1.1)

I followed, troubleshooting here:

http://www.alfajango.com/blog/rails-js-erb-remote-response-not-executing/

I have a simple test, which returns the JS (I See it in the console).

    <div class="text-center">
        <%= link_to 'Invoke UJS!',{:action => :demo, :controller => :public}, :class => "btn btn-default btn-lg", :remote => true %>
    </div>
    <div id="demo">
        ...
    </div>

The console result is this, so Ajax call is executed nicely.

$("#demo").html("UJS Inserted!");

The JS executes, when pasting in the Firebug command panel, but not by itself.

What am I doing wrong? Does UJS actually work?

application.js

//= require jquery
//= require jquery_ujs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions