/* Welcome to the Anatomy of Backbone.js challenges! We're going to be building a simple Appointment app for our friend, Dr. Goodparts.
So, let's get started and create an Appointment model class.
*/
// Create a model class
var Appointment = Backbone.Model.extend({});
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
| /** | |
| * Each of these samples can be used - note that you should pick one rather than add them all. | |
| * | |
| * How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
| * Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
| **/ | |
| /** | |
| * Add a content block after all notices, such as the login and coupon notices. | |
| * |
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
| /** | |
| * Tutorial: http://www.skyverge.com/blog/check-if-woocommerce-cart-is-empty/ | |
| **/ | |
| function skyverge_empty_cart_notice() { | |
| if ( WC()->cart->get_cart_contents_count() == 0 ) { | |
| wc_print_notice( __( 'Get free shipping if your order is over $60!', 'woocommerce' ), 'notice' ); | |
| // Change notice text as desired | |
| } |
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 Nivo Slider v3.2 | |
| * http://nivo.dev7studios.com | |
| * | |
| * Copyright 2012, Dev7studios | |
| * Free to use and abuse under the MIT license. | |
| * http://www.opensource.org/licenses/mit-license.php | |
| */ | |
| (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
| /** | |
| * Add the field to the checkout | |
| */ | |
| add_action( 'woocommerce_after_order_notes', 'my_custom_checkout_field' ); | |
| function my_custom_checkout_field( $checkout ) { | |
| echo '<div id="my_custom_checkout_field"><h2>' . __('My Field') . '</h2>'; | |
| woocommerce_form_field( 'my_field_name', array( |
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
| DOM : | |
| <div id="tour" data-location="london"> | |
| <button>Get Photos</button> | |
| <ul class="photos"> | |
| </ul> | |
| </div> | |
| JS: | |
| $(document).ready(function() { | |
| var el = $("#tour") |
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
| body { | |
| font-size: 62.5%; /* 1em = 10px */ | |
| } | |
| h1 { | |
| font-size: 2.4em; /* 24px / 10px */ | |
| } |