PageSourceSearch

https://ndna.com/image/cache/screenFunctions.js

js ndna.com collected 2026-10-04 05:46:05 UTC 3,030 bytes, 101 lines download raw bytes

1    var result = '',
2        ele, url = '',
3        outputHTML = '';
4    // allows us to get html data by requesting js template with ajax
5    // (skips js script and return plain html)
6    function getjsFormData(url, post) {
7        result = '';
8        $.ajax({
9            url: url,
10            global: false,
11            data: post,
12            type: "POST",
13            dataType: "html",
14            async: false,
15            success: function(msg) {
16                msg = msg.substring(16);
17                msg = msg.substring(-3);
18                msg = msg.replace(/\\/g, '');
19                result = msg.substring(0, (msg.length - 3));
20
21            }
22        });
23        return result;
24    }
25
26
27    $(window).load(function() {
28        $('.ajxdata').each(function(e) {
29            ele = $(this);
30            outputHTML = '';
31            url = ele.attr('url');
32            if (ele.attr('type') !== undefined && ele.attr('type') == 'js') {
33                outputHTML = getjsFormData(url, '');
34                ele.html(outputHTML).show();
35            }
36            // $(this).taoAjax(); return;
37        });
38    });
39
40    $(window).on('load resize', function() {
41        if ($(window).width() <= 991) {
42            $('#slide_block').css({ 'height': $('#slide_block .base.activeSlide img').height() });
43        } else {
44            $('#slide_block').css({ 'height': '' });
45        }
46    });
47
48
49// Fixed Menu
50$(window).on('load scroll', function() {
51    var value = $(this).scrollTop();
52    if (value > $('#header').height()) {
53        $('#header').addClass('headBg');
54    } else {
55        $('#header').removeClass('headBg');
56    }
57});
58
59// Go to top button 
60	$(document).ready(function($){
61		var offset = 800,
62		offset_opacity = 1200,
63		scroll_top_duration = 800,
64		$back_to_top = $('.cd-top');
65
66		//hide or show the "back to top" link
67		$(window).scroll(function(){
68			( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
69			if( $(this).scrollTop() > offset_opacity ) { 
70				$back_to_top.addClass('cd-fade-out');
71			}
72		});
73
74		//smooth scroll to top
75		$back_to_top.on('click', function(event){
76			event.preventDefault();
77			$('body,html').animate({
78				scrollTop: 0 ,
79			 	}, scroll_top_duration
80			);
81		});
82
83	});
84
85
86// add Banners to modal
87$('a.banner_thumb').each(function() {
88    $(this).on('click touch', function() {
89        var id = $(this).attr('data-id');
90        var img = $(this).attr('data-src');
91        var url = $(this).attr('data-url');
92        var label = $(this).attr('data-label');
93        $('#bannersModal').modal('toggle');
94        $('#bannersModal-body').empty();
95        $("#bannersModal-body").append('<div class="modalData_img"><a href="'+url+'" target="_blank"><img src="'+img+'"></a><div class="modalData_lnk hide'+label+'"><a href="'+url+'" target="_blank" class="button">'+label+'</a></div></div>');
96    });
97});
98
99
100
101        

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.