geolocation

This commit is contained in:
Mike Jolley 2015-06-17 14:16:37 +01:00
parent b1441c05c1
commit 38dd251f96
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
jQuery( function( $ ) {
// Orderby
$( '.woocommerce-ordering' ).on( 'change', 'select.orderby', function() {
$( this ).closest( 'form' ).submit();
});
// Target quantity inputs on product pages
$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {
var min = parseFloat( $( this ).attr( 'min' ) );
if ( min >= 0 && parseFloat( $( this ).val() ) < min ) {
$( this ).val( min );
}
});
});