some coffeescript not working, possibly related to application.js and/or
javascript plugins
I am using an app that uses alot of javascript plugins, which could be the
problem. I am trying to get the coffeescript to work, on the most basic
page (home.html.erb) in the most basic way (hide a div). Coffeescript
works in some parts of the app, but mostly not working. Home.html.erb is
part of the static_pages controller. The code below does not hide the div.
Any help would be appreciated
static_pages.js.coffee
jQuery ->
$("#rubyPic").hide()
$("#heroMain").hide()
home.html.erb
<div class="center hero-unit" id="heroMain">
<h1>finance institute</h1>
<p>
This is the home page for the RoR finance institute
</p>
</div>
<div class="box closable-chat-box">
<div class="box-content padded">
<h3>
Your Classes that you are a currently signed up for
are below:
</h3>
<section id="rubyPic">
<%= link_to image_tag("rails.png", alt: "Rails"),
'http://rubyonrails.org' %>
<%= render 'home_courses' %>
</section>
</div>
</div>
application.js
//= require jquery
//= require jquery_ujs
//= require bootstrap/bootstrap
//= require courses
//= require static_pages
//= require jquery191
//= require jqueryui1102
//= require fullcalendar/fullcalendar
//= require jquery_gritter
//= require sparkline
//= require tags_input
//= require jquery_uniform
//= require jquery.icheck
//= require select2
//= require d3
//= require xcharts
//= require bootstrap-wysihtml5
//= require justgage
//= require jquery.easy-pie-chart
//= require touchTouch
//= require dataTables
//= require responsive-tables
//= require wizard/bootstrap-wizard
//= require wizard/wizard_demo
//= require validation/jquery.validationEngine-en
//= require validation/jquery.validationEngine
//= require fullcalendar/calendar_events
//= require bootstrap-editable
//= require editable/editable_demo
//= require ibutton
//= require core_js/gritter
//= require core_js/calendar
//= require core_js/charts/xcharts_left_sine
//= require core_js/charts/xcharts_sine
//= require core_js/charts/xcharts_bar
//= require core_js/charts/sparkline_samples
//= require core_js/generic
//= require_tree .
No comments:
Post a Comment