I am trying to output some inline js on a page. I don't really want to add it to any JS file since it is so aribtrary and one time use. That being said, I am using haml and also trying to use content_for in order to place the JS after jquery is loaded from the layout.
The problem is that haml does not like multiline text that is indented (I think)
I am trying to do the following:
=content_for :javascript do
$(function(){
$("#sell_tickets_here").live("vclick",function(){
if($(this).is("checked"))
$("#tickets_here").display("inline");
else
$("#tickets_here").display("none");
});
});
In my layout I have:
= yield(:javascript)
Which actually works if I only have 1 line after the content_for statement.