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
| import UIKit | |
| func date(from dateString: String) -> Date? { | |
| let dateFormatter = DateFormatter() | |
| dateFormatter.dateFormat = "d/M/yyyy" | |
| dateFormatter.locale = Locale.init(identifier: "en_GB") | |
| return dateFormatter.date(from: dateString) | |
| } | |
| func components(from date: Date) -> DateComponents { |
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
| var $popover = $('#popover'); | |
| // Initializes popovers for an element. | |
| $popover.popover(); | |
| function updatePopoverPlacement() { | |
| $popover.popover('update'); | |
| } | |
| // This event is fired when the popover template has been added to the DOM. |
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
| $('#pages').on('shown.bs.page', function() { | |
| e.target; // newly activated page | |
| e.relatedTarget; // previous active page | |
| }); |
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
| $('#pages').page(); // Activates a page content container |
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
| <div id="pages" class="page-content"> | |
| <div id="page-one" class="page-pane fade in active"> | |
| ...<a href="#" data-toggle="page" data-target="#page-two">Go to page two.</a>... | |
| </div> | |
| <div id="page-two" class="page-pane fade"> | |
| ...<a href="#" data-toggle="page" data-target="#page-three">Go to page three.</a>... | |
| </div> | |
| <div id="page-three" class="page-pane fade"> |
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
| (function() { | |
| var method; | |
| var noop = function () {}; | |
| var methods = [ | |
| 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
| 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | |
| 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
| 'timeStamp', 'trace', 'warn' | |
| ]; | |
| var length = methods.length; |