PageSourceSearch

https://aend.org/js/index.js

js aend.org collected 2026-09-25 06:08:45 UTC 3,576 bytes, 100 lines download raw bytes

1/* 
2 * Autor: amolinero 17/02/2014
3 * index.js
4 */
5
6$(document).ready(function() {
7    $('.carousel').carousel({
8        interval: 3000
9    });
10});
11
12$(function() {
13    var transEndEventNames = {
14        'WebkitTransition': 'webkitTransitionEnd',
15        'MozTransition': 'transitionend',
16        'OTransition': 'oTransitionEnd',
17        'msTransition': 'MSTransitionEnd',
18        'transition': 'transitionend'
19    },
20    transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ],
21            $wrapper = $('#custom-inner'),
22            $calendar = $('#calendar'),
23            cal = $calendar.calendario({
24        weeks: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
25        weekabbrs: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'],
26        months: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'octubre', 'Noviembre', 'Diciembre'],
27        monthabbrs: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
28        displayWeekAbbr: true,
29        startIn: 1,
30        onDayClick: function($el, $contentEl, dateProperties) {
31            if ($contentEl.length > 0) {
32                showEvents($contentEl, dateProperties);
33            }
34        },
35        caldata: codropsEvents,
36        displayWeekAbbr : true
37    }),
38            $month = $('#custom-month').html(cal.getMonthName()),
39            $year = $('#custom-year').html(cal.getYear());
40
41    $('#custom-next').on('click', function() {
42        cal.gotoNextMonth(updateMonthYear);
43    });
44    $('#custom-prev').on('click', function() {
45        cal.gotoPreviousMonth(updateMonthYear);
46    });
47    $('#custom-current').on('click', function() {
48        cal.gotoNow(updateMonthYear);
49    });
50
51    function updateMonthYear() {
52        $month.html(cal.getMonthName());
53        $year.html(cal.getYear());
54    }
55
56    // just an example..
57    function showEvents($contentEl, dateProperties) {
58        hideEvents();
59        var $events = $('<div id="custom-content-reveal" class="custom-content-reveal"><h4>Eventos para el ' + dateProperties.day + ' ' + dateProperties.monthname + ', ' + dateProperties.year + '</h4></div>'),
60                $close = $('<span class="custom-content-close"></span>').on('click', hideEvents);
61        $events.append($contentEl.html(), $close).insertAfter($wrapper);
62        setTimeout(function() {
63            $events.css('top', '0%');
64        }, 25);
65    }
66    function hideEvents() {
67        var $events = $('#custom-content-reveal');
68        if ($events.length > 0) {
69            $events.css('top', '100%');
70            Modernizr.csstransitions ? $events.on(transEndEventName, function() {
71                $(this).remove();
72            }) : $events.remove();
73        }
74    }
75
76    // you can also add more data later on. As an example:
77    /*
78     someElement.on( 'click', function() {
79     
80     cal.setData( {
81     '03-01-2013' : '<a href="#">testing</a>',
82     '03-10-2013' : '<a href="#">testing</a>',
83     '03-12-2013' : '<a href="#">testing</a>'
84     } );
85     // goes to a specific month/year
86     cal.goto( 3, 2013, updateMonthYear );
87     
88     } );
89     */
90});
91
92$(document).on("click","#news+span",function(){
93    if($(this).hasClass('mas')){
94        $(this).replaceWith('<span class="menos">...<br>Menos noticias</span>');
95        $("#news").css({"max-height":"fit-content","overflow":"hidden"});
96    } else {
97        $(this).replaceWith('<span class="mas">...<br>Más noticias</span>');
98        $("#news").css({"max-height":"835px","overflow":"hidden"});
99    }
100});

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.