Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row">
- <div class="col-sm-6 text-left" style='margin-top: 1em; margin-bottom: 1em;'><b>View as: <img id="model-button" src="<?php echo HTTPS_SERVER;?>catalog/view/theme/toutountziv1/image/model.svg" style="height: 25px; padding-right: 0.5em; border-right: 1px solid black; cursor: pointer;"><img id="front-button" src="<?php echo HTTPS_SERVER;?>catalog/view/theme/toutountziv1/image/front.svg" style="height: 25px; padding-left: 0.5em; opacity: 0.5; cursor: pointer;"></b></div>
- <script>
- $(document).ready(function(){
- $('#model-button').on('click', function(){
- $('.category-product-image').each(function(){
- $(this).attr('src', '<?php echo HTTPS_SERVER?>image/catalog/products/' + $(this).attr('model')+ 'M.jpg');
- });
- $('#model-button').css({
- 'opacity' : '1'
- })
- $('#front-button').css({
- 'opacity' : '0.5'
- })
- });
- $('#front-button').on('click', function(){
- $('.category-product-image').each(function(){
- $(this).attr('src', '<?php echo HTTPS_SERVER?>image/catalog/products/' + $(this).attr('model')+ 'F.jpg');
- });
- $('#model-button').css({
- 'opacity' : '0.5'
- })
- $('#front-button').css({
- 'opacity' : '1'
- })
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement