javascript - Rails 4 - jQuery conflicts and function error -
i'm having rotten time trying figure out how resolve conflicts between javascript , jquery in rails 4 app.
my original problem conflict between javascript in dependent-fields gem , jquery in application.js. question here: rails - conflicts between jquery , javascript
i couldn't find solve problem, tried figure out how write jquery myself. problems had attempt here: rails 4 - jquery hide initially, toggle click
now, can't @ anything, because when load page, error:
syntaxerror: [stdin]:1:2: reserved word 'function'
the error message identifies line of show:
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => false %>
the steps took in trying approach remove dependent-fields gem gem file, comment out underscore.js , delete underscore-min.map app/assets/javascripts folder (and delete function shown in application.js -see first posted link) required dependent-fields work.
now can't figure out how undo mess. can see i've done wrong?
update
while renaming file .js.coffee .js.erb seems allow page load, console error shows as:
projects.self-9c019ba….js?body=1:1 uncaught typeerror: $ not function(anonymous function) @ projects.self-9c019ba….js?body=1:1 main.self-5888479….js?body=1:316 uncaught typeerror: dp(...).multiplefiltermasonry not functionwindow.onload @ main.self-5888479….js?body=1:316
i same problem when rename file projects.js
Comments
Post a Comment