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
<g:tax> | |
<g:country>US</g:country> //The country an item is taxed in (as an ISO 3166 country code) | |
<g:region>CA</g:region> //The geographic region that a tax rate applies to, e.g., in the US, the two-letter state abbreviation, ZIP code, or ZIP code range using * wildcard | |
<g:rate>8.25</g:rate> //The tax rate as a percent of the item price, i.e., number, as a percentage | |
<g:tax_ship>y</g:tax_ship> //Boolean value for whether you charge tax on shipping, y for yes or n for no - the default value is n | |
</g:tax> |
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
<!-- First include the jQuery library. You can just include Google's hosted version of jQuery by including the below script. --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
<!-- Then comes our code. --> | |
<script type="text/javascript"> | |
$(function(){ //Don't worry about this part | |
$('#image-to-switch').hover( //Finds the HTML element in the same way as CSS... this grabs the image with the id of "image-to-switch", then we call the magic hover function | |
function(){ //The hover function contains two other functions. The first defines what you want to do when the mouse enters the object | |
$(this).attr('src', 'some-new-image.jpg'); //$(this) refers to the element you selected previously (#image-to-switch). Then we ask to change the attribute (attr) named 'source' (src) to some new value (some-new-image.jpg) |