PageSourceSearch

https://dotblockdorchester.com/wp-content/plugins/wp-rentcafe/js/modal.js?ver=2.2.0

js dotblockdorchester.com collected 2026-10-04 14:51:31 UTC 2,766 bytes, 58 lines download raw bytes

1/**
2 * Detect visible italic heading flourishes and trigger transition
3 * @return {undefined}
4 */
5 jQuery(function($) {
6  $('#availabilityModal').on('show.bs.modal', function (event) {
7    var button = $(event.relatedTarget) // Button that triggered the modal
8    // var recipient = button.data('whatever') // Extract info from data-* attributes
9    var modalFloorplanName = button.data('floorplanname');
10    var modalApartmentNumber = button.data('number');
11    var modalMinRent = button.data('minrent');
12    var modalSqrft = button.data('sqrft');
13    var modalAvailable = button.data('available');
14    var modalImage = button.data('image');
15    var modalImage2 = button.data('image2');
16    var modalApply = button.data('apply');
17    var modalFloorplanBedrooms = button.data('floorplan-type-heading');
18    if( modalFloorplanBedrooms === "Studio" ) {
19      modalFloorplanBedrooms += ' / 0 bedrooms';
20    }
21    // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
22    // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
23    var modal = $(this)
24    // modal.find('.modal-title').text('New message to ' + recipient)
25    modal.find('#modalFloorplanName').text(modalFloorplanName);
26    modal.find('#modalApartmentNumber').text(modalApartmentNumber);
27    modal.find('#modalBedrooms').text(modalFloorplanBedrooms);
28    modal.find('#modalMinRent').text(modalMinRent);
29    modal.find('#modalSqrft').text(modalSqrft);
30    modal.find('#modalAvailable').text(modalAvailable);
31    modal.find('#modalApply').attr('href', modalApply);
32    modal.find('#modalImageWrapper').append(modalImage);
33    modal.find('#modalImageWrapper').append(modalImage2);
34    modal.find('.modalImageLink').remove(); // ensure any existing modal links are removed
35    const insertedModalImage = modal.find('#modalImageWrapper img')[0];
36    const newLink = document.createElement('a');
37    newLink.classList.add('modalImageLink');
38    newLink.href = insertedModalImage.src;
39    insertedModalImage.insertAdjacentElement('beforebegin', newLink);
40    newLink.insertAdjacentElement('afterbegin', insertedModalImage);
41
42
43    const insertedModalImage2 = modal.find('#modalImageWrapper img')[1];
44
45    if(insertedModalImage2 != undefined) {
46      const newLink2 = document.createElement('a');
47      newLink2.classList.add('modalImageLink');
48      newLink2.href = insertedModalImage2.src;
49      insertedModalImage2.insertAdjacentElement('beforebegin', newLink2);
50      newLink2.insertAdjacentElement('afterbegin', insertedModalImage2);
51    }
52  })
53
54  $('#availabilityModal').on('hidden.bs.modal', function (event) {
55    var modal = $(this);
56    modal.find('#modalImageWrapper img').remove();
57  })
58});

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.