diff options
Diffstat (limited to 'views/js')
| -rw-r--r-- | views/js/frontend.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/views/js/frontend.js b/views/js/frontend.js index 487007a..b364265 100644 --- a/views/js/frontend.js +++ b/views/js/frontend.js @@ -64,6 +64,48 @@ return false;
}
+
+
+ /* Minigallery */
+ function wpsg_product_bind()
+ {
+
+ // Prev im Produktcarousel
+ jQuery('.wpsg_productteaser .wpsg_productteaser_left').unbind('click').bind('click', function() {
+
+ if (typeof jQuery(this).attr("data-target") != "undefined") jQuery('#wpsg_slider_pt_' + jQuery(this).attr("data-target")).carousel("prev");
+ else jQuery(this).parents('.wpsg_productteaser').find('.carousel:visible').carousel("prev");
+
+ return false;
+
+ } );
+
+ // Next im Productcarousel
+ jQuery('.wpsg_productteaser .wpsg_productteaser_right').unbind('click').bind('click', function() {
+
+ if (typeof jQuery(this).attr("data-target") != "undefined") jQuery('#wpsg_slider_pt_' + jQuery(this).attr("data-target")).carousel("next");
+ else jQuery(this).parents('.wpsg_productteaser').find('.carousel:visible').carousel("next");
+
+ return false;
+
+ } );
+
+ // + / - im Produkttemplate
+ jQuery('.wpsg_product_sub, .wpsg_product_add').unbind('click').bind('click', function() {
+
+ var amount = parseInt(jQuery(this).parents('.product_add').find('.wpsg_amount').val());
+ if (amount == NaN || amount < 0) amount = 0;
+
+ if (jQuery(this).hasClass('wpsg_product_add')) amount ++;
+ else if (amount > 1) amount --;
+
+ jQuery(this).parents('.product_add').find('.wpsg_amount').val(amount);
+
+ return false;
+
+ } );
+
+ }
/**
* Sperrt die Funktionen im Produkttemplate, während einer Ajax Aktion
|
