PageSourceSearch

https://www.munkacsysuli.hu/jscripts/functions.js

js munkacsysuli.hu collected 2026-10-08 02:36:25 UTC 3,045 bytes, 106 lines download raw bytes

1function search() {
2    var input = $('#searchField').val().replace(/\//g, '|');
3    if ( input.length > 2 && input != aText['searchText']) {
4        window.location = '/search/simple/keyword/' + encodeURIComponent(input);
5    }
6}
7
8$(document).ready(function() {
9    
10    //Menü összevonása mobil nézetben
11    $('.bottom-menu ul').children('li').clone().appendTo('.mobile-menu ul');
12    
13    
14    
15    /*Keresés*/
16    $('#searchField').keypress(function(event) {
17        if (event.which == 13)
18            search();
19    });
20    
21    
22
23    /** Modernizr **/
24    if (!Modernizr.input.placeholder) {
25        $('[placeholder]').focus(function() {
26            var input = $(this);
27            if (input.val() == input.attr('placeholder')) {
28                input.val('');
29                input.removeClass('placeholder');
30            }
31        }).blur(function() {
32            var input = $(this);
33            if (input.val() == '' || input.val() == input.attr('placeholder')) {
34                input.addClass('placeholder');
35                input.val(input.attr('placeholder'));
36            }
37        }).blur();
38        $('[placeholder]').parents('form').submit(function() {
39            $(this).find('[placeholder]').each(function() {
40                var input = $(this);
41                if (input.val() == input.attr('placeholder')) {
42                    input.val('');
43                }
44            })
45        });
46    }
47    
48    
49
50    /** Fancybox **/
51    $('a[rel*=fancybox]').fancybox({
52        helpers : {
53            title : {
54                type : 'inside'
55            }
56        }
57    });
58    
59    $('a.fancybox').fancybox({
60        helpers : {
61            title : {
62                type : 'inside'
63            }
64        }
65    });
66    
67    
68    
69    $('.news_body_class img, .menu_body_class img, .box_body_class img').addClass('img-responsive');
70    $('.news_body_class table, .menu_body_class table, .box_body_class table').wrap('<div class="table-responsive">');
71    
72    
73    
74    /** Top menu **/
75    $('.top-menu > ul > li').each(function() {
76        if ($(this).has('ul').length) {
77            $(this).addClass('dropdown');
78            $('a', $(this)).first().addClass('dropdown-toggle').attr('data-toggle', 'dropdown').append('<b class="caret"></b>');
79        }
80    });
81
82    $('.top-menu ul ul li').each(function() {
83        if ($(this).has('ul').length) {
84            $(this).addClass('dropdown-submenu');
85        }
86    });
87
88
89    $('.top-menu ul').addClass('nav navbar-nav');
90    $('.top-menu ul ul').addClass('dropdown-menu').removeClass('nav navbar-nav');
91    
92    
93    
94    /** Mobile menu **/
95    $('.mobile-menu >ul >li').each(function() {
96        if ($(this).has('ul').length) {
97            $(this).addClass('dropdown');
98            $('a', $(this)).first().addClass('dropdown-toggle').attr('data-toggle', 'dropdown').append('<b class="caret"></b>');
99        }
100    });
101
102    $('.mobile-menu ul').addClass('nav navbar-nav');
103    $('.mobile-menu ul ul').addClass('dropdown-menu').removeClass('nav navbar-nav');
104    
105    
106});

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.