Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. var nth_photo_class = "nth-photo";
  2.  
  3. (function($){
  4. nth = {};
  5.  
  6. nth.framePhotos = function() {
  7. $('.'+nth_photo_class).each(function(i,el){
  8. var selector = 'nth-border-'+($('.nth-borders').length-1);
  9. $('.nth-borders.original').clone().insertAfter('.nth-borders.original').removeClass('original').css('display', 'block').addClass(selector);
  10. $('.'+selector+' .nth-b1-tl').stw().edge('img:eq('+i+')','tl');
  11. $('.'+selector+' .nth-b1-tr').stw().edge('img:eq('+i+')','tr');
  12. $('.'+selector+' .nth-b1-bl').stw().edge('img:eq('+i+')','bl');
  13. $('.'+selector+' .nth-b1-br').stw().edge('img:eq('+i+')','br');
  14. $('.'+selector+' .nth-b1-t').width($('img:eq('+i+')').width()).stw().edge('img:eq('+i+')','t');
  15. $('.'+selector+' .nth-b1-b').width($('img:eq('+i+')').width()).stw().edge('img:eq('+i+')','b');
  16. $('.'+selector+' .nth-b1-l').height($('img:eq('+i+')').height()).stw().edge('img:eq('+i+')','l');
  17. $('.'+selector+' .nth-b1-r').height($('img:eq('+i+')').height()).stw().edge('img:eq('+i+')','r');
  18. });
  19. }
  20.  
  21. nth.flashPhotos = function() {
  22. $('.'+nth_photo_class).each(function(i,el){
  23. $(el).overlay('flash').css('background-color', '#fff');
  24. $(el).overlay('flash').css('background-color', '#fff');
  25. });
  26. }
  27.  
  28. $(window).load(function() {
  29. nth.framePhotos();
  30. nth.flashPhotos();
  31. });
  32. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement