I’m using masonry.js on a project and want to insert a div containing a form. I would like to insert this div via jquery in the middle of a set of divs (the reason I’m doing it this way is because masonry doesn’t easily allow a fixed element to be placed and the divs to flow around it). In the js.erb file, I have been trying to accomplish this with the following:
$('#masonry').before("<%= j render 'black_box %>);
html_safe but none seem to work. Thanks!