Skip to content

Instantly share code, notes, and snippets.

<script src="/media/scripts/global.js" type="text/javascript"></script>
<script src="/media/scripts/global.js" type="text/javascript"/>
<xsl:output method="xml"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
omit-xml-declaration="yes"
encoding="UTF-8"
indent="yes" />
<xsl:with-param name="url" select="'/recipes/search-results/$/?search-category={$url-search-category}&amp;search-meal-time={$url-search-meal-time}&amp;search-meal-type={$url-search-meal-type}&amp;search-diet-restrictions={$url-search-diet-restrictions}&amp;search-button=Search'"/>
$(document).ready(function() {
$(".page").css('height', 'Xpx');
});
<body>
<xsl:choose>
<xsl:when test="$current-page 'handle-of-page-name'">
<xsl:attribute name="class">some-class</xsl:attribute>
</xsl:when>
<xsl:when test="$current-page 'handle-of-page-name'">
<xsl:attribute name="class">some-class</xsl:attribute>
</xsl:when>
<xsl:when test="$current-page 'handle-of-page-name'">
<xsl:attribute name="class">some-class</xsl:attribute>
<ul>
{%for item in post.images%}
<li{% if forloop.index == {{post.mobile}} %} class="mobile"{% endif %}>
<img src="/media/images/projects/{{item}}" alt="{% for item in post.alt %}{{item}}{% endfor %}" width="800" height="500" />
</li>
{% endfor %}
</ul>
/* About */
$("ul.navigation li a[href='#about']").fancybox({
'overlayColor' : '#000',
'overlayOpacity' : 0.5,
'titleShow' : false,
'padding' : 0,
'scrolling' : 'no',
'onStart' : function() {
$("html,body").animate({scrollTop:0}, 100, "easeInCirc");
}
$(window).scroll(function(){
$('body').removeClass('sticky');
if ($(window).scrollTop() >= 180){
$('body').addClass('sticky');
}
/*$('#header ul li a').removeClass('current').each(function(index) {
var section = $(this).attr('href');
if ($(window).scrollTop() >= $(section).offset().top) {
$('#header ul li a').removeClass('current');
$('#header ul li a[href='+section+']').addClass('current');
$('#header ul li a').click(function (){
var anchor = $(this).attr('href');
$('html, body').animate({scrollTop: $(anchor).offset().top}, 300, 'easeInOutCirc');
return false;
});