PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.9.1
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.9.1
trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 All 71 releases
pdf-print / bws_menu / js / bws_menu.js

bws_menu.js in PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin 1.9.1, at bws_menu/js/bws_menu.js

46 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function($) {
2 $(document).ready( function() {
3 var product = $( '.bws_product_box' ),
4 max = 0;
5 $( product ).each( function () {
6 if ( $( this ).height() > max )
7 max = $( this ).height();
8 });
9 $( '.bws_product_box' ).css( 'height', max + 'px' );
10
11 if ( $( '.bws-filter' ).length ) {
12 var prvPos = $( '.bws-filter' ).offset().top;
13 var maxPos = prvPos + $( '.bws-products' ).outerHeight() - $( '.bws-filter' ).outerHeight();
14
15 $( window ).scroll( function() {
16 if ( $( window ).width() > 580 ) {
17 var scrPos = Number( $( document ).scrollTop() ) + 40;
18 if ( scrPos > maxPos ) {
19 $( '.bws-filter' ).removeClass( 'bws_fixed' );
20 } else if ( scrPos > prvPos ) {
21 $( '.bws-filter' ).addClass( 'bws_fixed' );
22 } else {
23 $( '.bws-filter' ).removeClass( 'bws_fixed' );
24 }
25 }
26 });
27 }
28 $( '.bws-menu-item-icon' ).click( function() {
29 if ( $( this ).hasClass( 'bws-active' ) ) {
30 $( this ).removeClass( 'bws-active' );
31 $( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).hide();
32 } else {
33 $( this ).addClass( 'bws-active' );
34 $( '.bws-nav-tab-wrapper, .bws-help-links-wrapper' ).css( 'display', 'inline-block' );
35 }
36 });
37 $( '.bws-filter-top h2' ).click( function() {
38 if ( $( '.bws-filter-top' ).hasClass( 'bws-opened' ) ) {
39 $( '.bws-filter-top' ).removeClass( 'bws-opened' );
40 } else {
41 $( '.bws-filter-top' ).addClass( 'bws-opened' );
42 }
43 });
44
45 });
46 })(jQuery);