Discover the yellow section below the images labeled "Read more about /college/" on .
The first 3 links (Columbia, Princeton, and Brown) are not functioning properly, while the others are. An error in JavaScript is being raised stating
Uncaught Error: Syntax error, unrecognized expression: /columbia/academics/professors/1
. What could be causing this issue?
UPDATE After updating the JavaScript to:
$('#left > li > a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
The problem has been resolved.
HTML
<%= link_to "Get Paid to Answer Questions", "/the-deal", id: "the_deal", class: "btn btn-link" %>
<h1 id="heading">In-Depth Reviews of Colleges</h1>
<div class="tabbable">
... (omitted for brevity)
</div>
<div id="notify">
<p>Presently, reviews are available only for these 12 schools. Provide your email address below to receive notifications when new reviews are added!</p>
<span id="notify_span">
<%= simple_form_for :subscribe, url: 'subscribe' do |f| %>
<%= f.input :email, placeholder: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fa8f899f88ba9e95979b9394d4999597">[email protected]</a>', label: false, required: true %> <br/>
<%= f.button :submit, "1-Click Sign Up", class: "btn btn-primary", data: { :disable_with => "Submitting..." } %>
<% end %>
</span>
</div>
<ul id="bottom_links">
<li><%= link_to "I Graduated High School. Now What?", "/i-graduated-high-school-now-what" %></li>
<li><%= link_to "How to Choose a College", "/how-to-choose-a-college" %></li>
<li><%= link_to "How College Inside View Got Started", "https://medium.com/what-i-learned-building/322e8668ed6f" %></li>
</ul>
JS
$('#columbia > a, #princeton > a, #brown > a, #penn > a, #harvard > a, #yale > a, #cornell > a, #dartmouth > a, #pitt > a, #wisconsin > a, #colgate > a, #adelphi > a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
CSS
@import "bootstrap";
@import "animations";
#home_css {
max-height: 1200px !important;
#the_deal {
float: right;
font-size: 12px;
}
... (styling details omitted for brevity)
}