This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if element length is greater than 0 | |
if ($('.selector').length) { | |
// do something | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php getPageField('page-slug-name','field-name'); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------- | |
// 'BOOTSTRAPIFY' FORMS | |
// ---------------------------------------------- | |
var $bcWebform = $('.webform, .form'); | |
if ($bcWebform.length) { | |
$bcWebform.find('td, .item').wrapInner('<div class="form-group"></div>'); | |
$bcWebform.find('input[type=text], input[type=password], .textbox, textarea, .cat_textbox_small, select').addClass('form-control'); | |
$bcWebform.find('input[type=submit]').addClass('btn btn-default'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert BC photo galleries to lists | |
var $pg = $('.photogalleryTable'); | |
if ($pg.length) { | |
$pg.each(function(index){ | |
var $pgInner = $(this).html(); | |
$(this).replaceWith('<ul id="gallery-'+index+'" class="list-inline list-gallery product-gallery">' + $pgInner + '</ul>'); | |
var $newGallery = $('#gallery-'+index); | |
$newGallery.find('a').addClass('fancybox').removeAttr('onclick').attr('rel', 'group-'+index).wrap('<li>').find('img').addClass('img-responsive'); | |
$newGallery.css('visibility', 'visible').hide().fadeIn(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a .fa-square { | |
color: #fff; | |
} | |
a .fa-twitter-square { | |
color: #00aced; | |
} | |
a .fa-facebook-square { | |
color: #3b5998; | |
} | |
a .fa-youtube-square { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fix line breaks in web app lists | |
// .js .fix-br set to hidden in css | |
if (('.fix-br').length) { | |
var str; | |
$('.fix-br').each(function () { | |
str = $(this).html(); | |
str = str.replace(/(\n)+/g, '<br>'); | |
$(this).html(str).css('visibility', 'visible'); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fields: | |
standard_content_section: | |
type: section | |
display: Page Content | |
standard_content: | |
type: replicator | |
instructions: Insert whatever type of content you need. Rearrange as necessary. | |
sets: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{# | |
Statamic partial for outputting this replicator fieldset: | |
https://gist.github.com/addisonhall/606290c70c7e8f20101e | |
#}} | |
{{# | |
Build FAQ menu, if necessary | |
Uses https://github.com/michaelhue/statamic-var | |
--------------------------------------- | |
#}} |
OlderNewer