Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. <div class="row">
  2. <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>
  3. <script>
  4. $(document).ready(function(){
  5. $('#model-button').on('click', function(){
  6. $('.category-product-image').each(function(){
  7. $(this).attr('src', '<?php echo HTTPS_SERVER?>image/catalog/products/' + $(this).attr('model')+ 'M.jpg');
  8. });
  9.  
  10. $('#model-button').css({
  11. 'opacity' : '1'
  12. })
  13.  
  14. $('#front-button').css({
  15. 'opacity' : '0.5'
  16. })
  17. });
  18.  
  19. $('#front-button').on('click', function(){
  20. $('.category-product-image').each(function(){
  21. $(this).attr('src', '<?php echo HTTPS_SERVER?>image/catalog/products/' + $(this).attr('model')+ 'F.jpg');
  22. });
  23.  
  24. $('#model-button').css({
  25. 'opacity' : '0.5'
  26. })
  27.  
  28. $('#front-button').css({
  29. 'opacity' : '1'
  30. })
  31. });
  32. });
  33. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement