-1

Can any one tell me why this isn't compiling in HAML?

:javascript
  $(document).ready(function(){
    // Examples of how to assign the Colorbox event to elements
    $(".group1").colorbox({rel:'group1'});
    $(".group2").colorbox({rel:'group2'});
    $(".group3").colorbox({rel:'group3'});
    $(".group4").colorbox({rel:'group4'});
    $(".group5").colorbox({rel:'group5'});
    $(".group6").colorbox({rel:'group6'});
    $(".group7").colorbox({rel:'group7'});
    $(".group8").colorbox({rel:'group8'});
  });

The error I am getting is:

"Syntax error on line 33: Inconsistent indentation: 1 tab used for indentation, but the rest of the document was indented using 2 spaces. Use --trace for backtrace."

Line 33 is where the comment is.

I am using codekit on a mac

belotte
  • 69
  • 7
  • “1 tab used for indentation, but the rest of the document was indented using 2 spaces.” So what happens when you replace the tab character with spaces? – matt Jul 25 '14 at 09:23

3 Answers3

0

Try this:

#{ # this is your comment text 
}
Hack4Life
  • 563
  • 1
  • 11
  • 34
0

Try using

- # Examples of how to assign the Colorbox event to elements

thedevlpr
  • 1,101
  • 12
  • 28
0

To comment in HAML use just one forward slash and put one space in between the slash ant your comment example / Examples of how to assign the Colorbox event to elements