PageSourceSearch

http://www.reussbruecke.ch/scripts/kontakt.js

js reussbruecke.ch collected 2026-09-26 20:38:30 UTC 2,283 bytes, 76 lines download raw bytes

1$(document).ready(function() {
2	$("#start").val("")
3	$("#start").focus()	
4	$(".dropdown dt a").click(function() {
5		$(".dropdown dd ul").fadeToggle();		
6	});
7                        
8	$(".dropdown dd ul li a").click(function() {
9		var text = $(this).html();
10		$(".dropdown dt a span").html(text);
11		$(".dropdown dd ul").fadeOut();
12		
13		$("#countryID").val(getSelectedValue("sample"));
14		$("#start").val("");
15		$("#start").focus()				
16	});
17                        
18	function getSelectedValue(id) {
19		return $("#" + id).find("dt a span.value").html();
20	}
21
22	$(document).bind('click', function(e) {
23		var $clicked = $(e.target);
24		if (! $clicked.parents().hasClass("dropdown"))
25			$(".dropdown dd ul").fadeOut();		
26	});
27});
28
29function clearStart() {	
30	$("#start").val("");					
31};
32
33function upperCase() {
34var input = document.getElementById("start");
35            input.value = input.value.substr(0, 1).toUpperCase() + input.value.substr(1); 
36};
37
38function initMap() {
39  var directionsDisplay = new google.maps.DirectionsRenderer;
40  var directionsService = new google.maps.DirectionsService;
41  var myLatLng = {lat: 47.2799580, lng: 8.3950120};
42  var map = new google.maps.Map(document.getElementById('map'), {
43    zoom: 11,
44    center: myLatLng
45  });
46  
47  var marker = new google.maps.Marker({
48    position: myLatLng,
49    map: map,
50    title: 'Wolfgang Media'
51  });  
52  
53  directionsDisplay.setMap(map);
54  directionsDisplay.setPanel(document.getElementById('right-panel'));
55
56  var onChangeHandler = function() {
57    calculateAndDisplayRoute(directionsService, directionsDisplay);
58  };
59  document.getElementById('route').addEventListener('click', onChangeHandler);
60};
61
62function calculateAndDisplayRoute(directionsService, directionsDisplay) {
63  var start = document.getElementById("routeStart").value = document.getElementById("start").value + ", " + document.getElementById("countryID").value; 
64  var end = "47.2799580, 8.3950120";  
65  directionsService.route({
66    origin: start,
67    destination: end,
68    travelMode: google.maps.TravelMode.DRIVING
69  }, function(response, status) {
70    if (status === google.maps.DirectionsStatus.OK) {
71      directionsDisplay.setDirections(response);
72    } else {
73      window.alert('Routenanforderung fehlgeschlagen aufgrund: ' + status);
74    }
75  });
76};

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.