This file contains hidden or 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
| //----------------------------------------------// | |
| //---- input rounded corners on iPad/Safari ----// | |
| //----------------------------------------------// | |
| // turn off iPhone/Safari input element rounding | |
| input { -webkit-appearance: none; border-radius: 0; } |
This file contains hidden or 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
| $(document).ready(function() { | |
| // placeholder for newsletter input field | |
| $('.i18n-nl .newsletter .email').attr("placeholder", "Uw E-mailadres"); | |
| $('.i18n-fr .newsletter .email').attr("placeholder", "Votre adresse E-mail"); | |
| }); |
This file contains hidden or 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($(window).width() > 550){ | |
| // make a select from our language list | |
| $('.language ul').each(function(){ | |
| var select = $(document.createElement('select')).attr('class', 'select').insertBefore($(this).hide()); | |
| $('ul.language-switcher-locale-url > li').each(function(){ | |
| var link = $(this).find('a'); | |
| var url = link.attr('href'); | |
| option = $(document.createElement('option')).appendTo(select).val(url).html($(this).html()); |
This file contains hidden or 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
| /** | |
| * jQuery function will convert each color to gray scale and return average of all pixels, so final value will be between 0 (darkest) and 255 (brightest){Object} $ | |
| * docu: http://stackoverflow.com/questions/13762864/image-dark-light-detection-client-sided-script | |
| * docu: http://jsfiddle.net/s7Wx2/7/ | |
| */ | |
| (function ($) { | |
| //darkness of picture | |
| function getImageLightness(imageSrc,callback) { |
This file contains hidden or 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
| /* disable html5 validation */ | |
| $('form').each(function() { | |
| $(this).attr('novalidate', 'novalidate'); | |
| }); |
This file contains hidden or 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
| /** | |
| * accordion effect on hover | |
| * HTML: .sub-menu-1 ul li.expanded ul li | |
| */ | |
| $('.sub-menu-1 .expanded').hover(function() { | |
| that = this; | |
| setTimeout(function() { | |
| $(that).find('ul').slideDown(); | |
| $(that).siblings().find('ul').slideUp(); |
This file contains hidden or 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
| // capitalize only first letter of a string | |
| function capitaliseFirstLetter(string){ | |
| return string.charAt(0).toUpperCase() + string.slice(1); | |
| } |