JQuery Check if cookie exists

<script>
jQuery(document).ready(function ($) {
  // Function to check if a cookie exists
  function checkCookie(name) {
    return document.cookie.split(";").some(function (item) {
      return item.trim().indexOf(name + "=") == 0;
    });
  }

  // Check if the cookie exists
  if (checkCookie("parent_corner_show_content")) {
    // If the cookie exists, hide the section
      $("#parent_corner_form_section").hide();
      $("#parent_corner_contents_section").show();

  }
});
</script>

Disable select field with JS/JQuery from another/referrer link

jQuery(document).ready(function($){
	$(document).ready(function() {
		// Get the dropdown element
		var dropdown = $('#input_9_18');

		if (document.referrer === 'https://rockymountainpreschool.com/parent-survey/') {
		// Prevent click and selection events
		dropdown.on('mousedown', function(event) {
			event.preventDefault();
		});
		
		// Add the "readonly" attribute to the dropdown
    dropdown.attr('readonly', 'readonly');
			
		// Add the 'custom-cursor' class to the link
    dropdown.addClass('custom-cursor');
		}
	});

});

jQuery set dynamic image height

jQuery(document).ready(function( $ ){
  var heightc = $(".top-ads-banner img").height();
    $(".top-ads-banner").height(heightc);
});

CSS

.top-ads-banner {
	position: sticky;
	top: 0;
	-webkit-transition: all 1.5s;
    -moz-transition: all 1.5s;
    -ms-transition: all 1.5s;
    -o-transition: all 1.5s;
    transition: all 1.5s;
	width: 100%;
	margin: 0 auto;
	background: #000;
	height: 0px;
}