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
| /** | |
| * Custom RxMethod Checkout step | |
| * | |
| * @type {*} | |
| */ | |
| var RxMethod = Class.create(); | |
| RxMethod.prototype = { | |
| initialize: function(form, saveUrl) { | |
| var _self = this; |
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
| $thumbnail.find('img').one('load', function() { | |
| var $this = $(this); | |
| if($this.attr('src').replace('thumbnails', 'fullsize') == $lgImg.attr('src')){ | |
| $this.parent('a').addClass('active'); | |
| } | |
| }).each(function() { | |
| if($(this).complete){ | |
| $(this).load(); | |
| } | |
| }); |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| /** | |
| 1.1 Checkout | |
| - Gorilla will add custom client side validation to the shipping method address field to test if the string contains a pattern of characters that would denote that the string contains the words PO Box. | |
| - If the validation fails the user will be displayed a message stating that the shipping address cannot be a PO Box. | |
| ? P.O. Box | |
| ? PO. Box | |
| ? PO Box | |
| ? POBox | |
| ? P O Box |
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
| /** | |
| * Compares the images natural height and width with a provided | |
| * minimum height and width to check against. Fires callback if | |
| * valid | |
| * | |
| * @param $img jQuery Object | |
| * @param minH integer | |
| * @param minW integer | |
| * @param fn function | |
| */ |
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.prototype.openSection = function(section) { | |
| var section = $(section); | |
| // Check allow | |
| if (this.checkAllow && !Element.hasClassName(section, 'allow')){ | |
| return; | |
| } | |
| if(section.id != this.currentSection) { | |
| this.closeExistingSection(); |
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
| // Validation errors | |
| .input-box { | |
| position: relative; | |
| .validation-failed { | |
| padding-right: 80px; | |
| } | |
| .validation-advice { | |
| background-color: #fff; | |
| border: 2px solid @brand-orange; |
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
| <script> | |
| (function(doc, script) { | |
| var js, | |
| s = doc.getElementsByTagName(script)[0], | |
| load = function(src, callback, id) { | |
| if (d.getElementById(id)) return; | |
| js = doc.createElement(script); | |
| js.src = src; | |
| js.id = id; | |
| //js.async = true; |
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
| .sprite(@pos-x; @pos-y; @repeat: no-repeat) { | |
| background: url("../images/sprite.png") @pos-x @pos-y @repeat; | |
| @media only screen and (-webkit-min-device-pixel-ratio: 2), | |
| only screen and ( min--moz-device-pixel-ratio: 2), | |
| only screen and ( -o-min-device-pixel-ratio: 2/1), | |
| only screen and ( min-device-pixel-ratio: 2), | |
| only screen and ( min-resolution: 192dpi), | |
| only screen and ( min-resolution: 2dppx) { | |
| background-size: 500px 500px; |