if the HAML is:
.class1
.class2
.class3
%div
content... many lines
How can it be made so that it doesn't respond with class1 and class2 if it is Ajax?
- if !request.xhr?
.class1
.class2
.class3
%div
content... many lines
won't work, because if not Ajax, then class3 is not a child of class2. It might have to be something like
- if !request.xhr?
.class1
.class2
.class3
%div
content... many lines
- else
.class3
%div
content... many lines
and it is repeating a lot of code. Can it be structure within the same file? Or the second part made into a partial?