PageSourceSearch

https://ebenthal.at/wp-content/plugins/lightbox-slider-pro-v6.2/lightbox/smoothbox/smoothbox.js?ver=7.1.2

js ebenthal.at collected 2026-10-02 19:50:07 UTC 3,518 bytes, 83 lines download raw bytes

1/*
2 * Smoothbox
3 * http://kthornbloom.com/smoothbox.php
4 *
5 * Copyright 2013, Kevin Thornbloom
6 * Free to use and abuse under the MIT license.
7 * http://www.opensource.org/licenses/mit-license.php
8 */
9
10jQuery(document).ready(function() {
11
12    jQuery('.sb').click(function(event){
13        // which was clicked?
14        var clicked = jQuery(this).index('.sb');
15            
16        // create smoothbox
17       jQuery('body').append('<div class="smoothbox sb-load"><div class="smoothbox-table"><div class="smoothbox-centering"><div class="smoothbox-sizing"><div class="sb-nav"><a href="#" class="sb-prev sb-prev-on" alt="Previous">&larr;</a><a href="#" class="sb-cancel" alt="Close">&times;</a><a href="#" class="sb-next sb-next-on" alt="Next">&rarr;</a></div><ul class="sb-items"></ul></div></div></div></div>');
18          
19        jQuery.fn.reverse = [].reverse;
20        // get each picture, put them in the box
21        jQuery('.sb').reverse().each(function() {
22           var href = jQuery(this).attr('href');
23            if (jQuery(this).attr('title')) {
24                var caption = jQuery(this).attr('title');
25                jQuery('.sb-items').append('<div class="sb-item"><div class="sb-caption">'+ caption +'</div><img src="'+ href + '"/></div>');
26            }   
27            else {
28                  jQuery('.sb-items').append('<div class="sb-item"><img src="'+ href + '"/></div>');
29                
30           }
31        });
32        
33        jQuery('.sb-item').slice(0,-(clicked)).appendTo('.sb-items');
34        jQuery('.sb-item').not(':last').hide();
35        jQuery('.sb-item img:last').load(function() { 
36            jQuery('.smoothbox-sizing').fadeIn('slow', function() {
37                jQuery('.sb-nav').fadeIn();
38                jQuery('.sb-load').removeClass('sb-load');
39            });
40        });
41        event.preventDefault();
42    });
43    
44    jQuery(document).on('click', ".sb-cancel", function(event){
45        jQuery('.smoothbox').fadeOut('slow', function() {
46            jQuery('.smoothbox').remove();
47        });
48        event.preventDefault();
49    });
50
51    jQuery(document).on('click', ".sb-next-on", function(event){
52        jQuery(this).removeClass('sb-next-on');
53        
54       
55      
56            jQuery('.sb-item:last').addClass('sb-item-ani');
57        // after animation, move order & remove class
58        
59            jQuery(".sb-item:last").bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
60                jQuery('.sb-item').eq(-2).addClass('no-trans').fadeIn('fast');
61                jQuery(this).removeClass('sb-item-ani').prependTo('.sb-items').hide();
62                jQuery('.sb-item:last').removeClass('no-trans');
63                jQuery('.sb-next').addClass('sb-next-on');
64                jQuery('.sb-item').unbind();
65            }); 
66       
67        event.preventDefault();
68    });
69
70    jQuery(document).on('click', ".sb-prev-on", function(event){  
71        jQuery(this).removeClass('sb-prev-on');
72       
73            jQuery('.sb-item:last').hide(); 
74            jQuery(".sb-item:first").addClass('sb-item-ani2 no-trans').appendTo('.sb-items');
75            jQuery('.sb-item:last').show().removeClass('no-trans').delay(1).queue(function(next){
76                jQuery('.sb-item:last').removeClass('sb-item-ani2');
77                next();
78            });
79            jQuery(this).addClass('sb-prev-on');    
80       
81        event.preventDefault();
82    });
83});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.