Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy won't this simple jquery work in rails 4
    primarykey
    data
    text
    <p>Why won't this code work in rails 4. I have changed my gemfile so i use the 2.3.2 version of twitter bootstrap.</p> <pre><code>ruby '1.9.3' gem 'rails', '4.0.0' gem 'pg' gem 'cloudinary' #gem 'less-rails-bootstrap' gem 'less-rails-bootstrap', github: 'metaskills/less-rails-bootstrap', ref: 'cbe20d4593e21297f7bc3bc6bc6471a7ad18e890' gem 'therubyracer' gem 'rails_12factor', group: :production gem 'sass-rails', '~&gt; 4.0.0' gem 'uglifier', '&gt;= 1.3.0' gem 'coffee-rails', '~&gt; 4.0.0' gem 'jquery-rails' gem 'jquery-turbolinks' gem 'turbolinks' gem 'jbuilder', '~&gt; 1.2' group :doc do gem 'sdoc', require: false end </code></pre> <p>Here is my simple code. I just want to se a div with my facebook comments. I was working before i run bundle install.</p> <pre><code>&lt;div class="span10 offset1 article-layout"&gt; &lt;h3&gt;Article headline&lt;/h3&gt; &lt;img src="http://placehold.it/600x400"&gt; &lt;p class="blog-tekst"&gt;Indhold tekst tekst tekst.&lt;/p&gt; &lt;div&gt; &lt;button class="btn btn-large btn-block btn-primary comments-show-button post-button" type="button"&gt;Show comments&lt;/button&gt; &lt;button class="btn btn-large btn-block btn-primary remove-button post-button" type="button"&gt;Remove comments&lt;/button&gt; &lt;div class="comments"&gt; &lt;div class="fb-comments" data-href="http://datvote.com" data-width="780"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; $(document).ready(function(){ $(".comments-show-button").click(function() { var $thisPost = $(this).closest('div.span12'); var $comments = $thisPost.find('div.comments'); $comments.show(); $thisPost.find(".remove-button").show(); $thisPost.find(".comments-show-button").hide(); }); $(".remove-button").click(function() { var $thisPost = $(this).closest('div.span12'); var $comments = $thisPost.find('div.comments'); $comments.hide(); $thisPost.find(".remove-button").hide(); $thisPost.find(".comments-show-button").show(); }); }); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload