PageSourceSearch

https://www.alandayuber.co.uk/js/search/price.js?v=1

js alandayuber.co.uk collected 2026-10-09 21:41:41 UTC 2,393 bytes, 77 lines download raw bytes

1function resetPriceOptions() {
2  $('select[name="finance_from"]').val(
3    $('select[name="finance_from"] option:first').val()
4  );
5  $('select[name="finance_to"]').val(
6    $('select[name="finance_to"] option:first').val()
7  );
8  $('select[name="price_from"]').val(
9    $('select[name="price_from"] option:first').val()
10  );
11  $('select[name="price_to"]').val(
12    $('select[name="price_to"] option:first').val()
13  );
14  $("#dropdownMenuButton").text("Any Price");
15}
16
17$(document).ready(function () {
18  $('.dropdown-price input[type="radio"]').on("change", function () {
19    if ($(this).attr("id") === "monthlyPayment") {
20      $(".dropdown-price .monthly").show();
21      $(".dropdown-price .cash").hide();
22    } else {
23      $(".dropdown-price .monthly").hide();
24      $(".dropdown-price .cash").show();
25    }
26  });
27
28  $("select.monthly").show();
29  $("select.cash").hide();
30
31  $("#monthlyPayment").on("click", function (e) {
32    resetPriceOptions();
33    $(".monthly").show();
34    $(".cash").hide();
35    $("form#vehicle-search").facets("ajaxReq");
36  });
37
38  $("#cashPrice").on("click", function (e) {
39    resetPriceOptions();
40    $(".cash").show();
41    $(".monthly").hide();
42    $("form#vehicle-search").facets("ajaxReq");
43  });
44});
45
46function setPriceSelectName() {
47  var cashPriceSelected = $("#cashPrice").is(":checked");
48  var cashMin = $('select[name="price_from"] option:selected').text()
49    ? $('select[name="price_from"] option:selected').text()
50    : "no min";
51  var cashMax = $('select[name="price_to"] option:selected').text()
52    ? $('select[name="price_to"] option:selected').text()
53    : "no max";
54  var monthlyMin = $('select[name="finance_from"] option:selected').text()
55    ? $('select[name="finance_from"] option:selected').text()
56    : "no min";
57  var monthlyMax = $('select[name="finance_to"] option:selected').text()
58    ? $('select[name="finance_to"] option:selected').text()
59    : "no max";
60
61  if (cashPriceSelected) {
62    if (cashMin === "No Min" && cashMax === "No Max") {
63      $("#dropdownMenuButton").text("Any Price");
64    } else {
65      $("#dropdownMenuButton").text(cashMin + " - " + cashMax + " cash price");
66    }
67  } else {
68    if (monthlyMin === "No Min" && monthlyMax === "No Max") {
69      $("#dropdownMenuButton").text("Any Price");
70    }
71    {
72      $("#dropdownMenuButton").text(
73        monthlyMin + " - " + monthlyMax + " per month"
74      );
75    }
76  }
77}

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.