Struggling with CSS and JQuery, I'm attempting to integrate Magnific Popup into my app. Utilizing the https://github.com/joshuajansen/magnific-popup-rails, I find that the code I insert into the view is displaying on the page directly. After following the instructions on Github, I included the necessary code in the view.
<h1><%= @user.username %></h1>
<div class="parent-container">
$(document).ready(function() {
$('.parent-container').magnificPopup({
delegate: 'a',
type: 'image'
});
});
<% @user.photos.each do |photo| %>
<%= link_to image_tag(photo.image_url(:thumb)), photo.image_url%>
</div>
<% end %>