diff options
| author | thomas <noreply@maennchen1.de> | 2019-07-05 06:26:08 +0000 |
|---|---|---|
| committer | thomas <noreply@maennchen1.de> | 2019-07-05 06:26:08 +0000 |
| commit | f4f51b6a27edc2ea39d254b34ab26444a20bb159 (patch) | |
| tree | 945f87e3c1f157ca5a2447829ee82ae119dfeaff /views/js/frontend.js | |
| parent | 5b24a6847a6d94173e245ee48257baf3d175ab1d (diff) | |
- standard2
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7472 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/js/frontend.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
|
