This file contains hidden or 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
| add_filter( 'product_type_selector', 'remove_product_types' ); | |
| function remove_product_types( $types ){ | |
| unset( $types['grouped'] ); | |
| unset( $types['external'] ); | |
| unset( $types['variable'] ); | |
| return $types; | |
| } |
This file contains hidden or 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
| $(function(){ | |
| // Trigger maximage | |
| jQuery('#maximage').maximage({ | |
| cssBackgroundSize: false, // We don't want to use background-size:cover for our custom size | |
| backgroundSize: function( $item ){ | |
| var verticalOffset = 200, // Top offset + Bottom offset | |
| horizontalOffset = 200; // Left offset + Right offset | |
| if($.Window.data('w') / $.Window.data('h') < $item.data('ar')){ // Image size based on height | |
| $item |
This file contains hidden or 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
| $(function(){ | |
| // Helper function to Fill and Center the HTML5 Video | |
| jQuery('video, object').maximage('maxcover'); | |
| }); |
This file contains hidden or 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
| $(function(){ | |
| // Trigger maximage | |
| jQuery('#maximage').maximage({ | |
| cssBackgroundSize: false, | |
| backgroundSize: function( $item ){ | |
| // Contain portrait but cover landscape | |
| if ($item.data('h') > $item.data('w')) { | |
| if ($.Window.data('w') / $.Window.data('h') < $item.data('ar')) { | |
| $item | |
| .height(($.Window.data('w') / $item.data('ar')).toFixed(0)) |
This file contains hidden or 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
| /* Basic CSS for FillElement */ | |
| #holder { | |
| height:300px; | |
| overflow: hidden; | |
| width:300px; | |
| } | |
| #maximage { | |
| position:relative !important; | |
| } |
This file contains hidden or 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
| <!-- Basic HTML --> | |
| <div id="maximage"> | |
| <img src="../lib/images/demo/wall_portrait.jpg" alt="" width="1400" height="1050" /> | |
| <img src="../lib/images/demo/coalesse.jpg" alt="Coalesse" width="1400" height="1050" /> | |
| <img src="../lib/images/demo/laughing.jpg" alt="" width="1400" height="1050" /> | |
| <img src="../lib/images/demo/roof_shooting.jpg" alt="" width="2048" height="1536" /> | |
| <img src="../lib/images/demo/man.jpg" alt="" width="2048" height="1536" /> | |
| <img src="../lib/images/demo/coffee_shop.jpg" alt="" width="2048" height="1536" /> | |
| <img src="../lib/images/demo/gas_station.jpg" alt="" width="2048" height="1536" /> | |
| </div> |
This file contains hidden or 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
| $(function(){ | |
| $('#maximage').maximage({ | |
| cycleOptions: { | |
| fx: 'fade', | |
| // Speed has to match the speed for CSS transitions | |
| speed: 1000, | |
| timeout: 0, | |
| prev: '#arrow_left', | |
| next: '#arrow_right', | |
| pause: 1 |