PageSourceSearch

https://www.historictours.com/wp-content/themes/historictours-theme/dist/weather-ajax-script.js

js historictours.com collected 2026-09-24 18:17:26 UTC 1,849 bytes, 60 lines download raw bytes

1jQuery(document).ready(function($) {
2
3
4    function getWeatherAjax(citySlug, targetdisplay ){
5        // targetdisplay ='.temperature-display';
6        weatherLoader('start',targetdisplay);
7        // Send an AJAX request to the server
8        $.ajax({
9            type: 'POST',
10            url: ajax_object.ajax_url,            
11            data: {
12                action: 'weahter_ajax_function', // The PHP function to call
13                city_slug: citySlug // Pass the city slug to the function
14            }
15        })
16        .done(function(response){
17            // Handle the response from the server
18            //console.log(response);
19            jQuery(targetdisplay).html(response);
20            //alert(response);
21        })
22        .fail(function(response){
23        })
24        .always(function(response){
25            // searchLoader(false);
26            weatherLoader('done',targetdisplay);
27        });
28    }
29
30    function weatherLoader(action,target){
31        if(action=='start'){
32            jQuery(target).addClass('target-display-loader');
33        }else{
34            jQuery(target).removeClass('target-display-loader');
35        }
36        
37    }
38    
39    /*jQuery('.getTemperatureJs').click(function(e) {
40
41        e.preventDefault();
42        var citySlug = jQuery(this).data('city');
43        // console.log(citySlug);
44        getWeatherAjax(citySlug,'.temperature-display');
45
46    });
47    */
48    
49    jQuery(document).on('activeClassAdded', '.getTemperatureOnslideJs', function(e) {
50        
51        var citySlug = jQuery(this).data('city');
52        var targetcontent = jQuery(this).data('temptarget')
53
54        if (jQuery(targetcontent).length && targetcontent!='' && citySlug!=''){
55            getWeatherAjax(citySlug,targetcontent );
56        }
57        
58    });
59    
60});

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.