PageSourceSearch

https://www.ayto-valdetorresdejarama.es/scripts/scripts.js?v=2

js ayto-valdetorresdejarama.es collected 2026-10-02 19:48:14 UTC 6,780 bytes, 93 lines download raw bytes

1//Dropdwon Hover
2$(document).ready(function() {
3  var navbarToggle = '.navbar-toggle'; // name of navbar toggle, BS3 = '.navbar-toggle', BS4 = '.navbar-toggler'  
4  $('.dropdown, .dropup').each(function() {
5    var dropdown = $(this),
6      dropdownToggle = $('[data-toggle="dropdown"]', dropdown),
7      dropdownHoverAll = dropdownToggle.data('dropdown-hover-all') || false;
8	  
9	  //Para que funcione con click:
10	  return false;	  
11	  //Si queremos con hover, eliminar el return false;
12	  
13    // Mouseover
14    dropdown.hover(function(event){
15      var notMobileMenu = $(navbarToggle).size() > 0 && $(navbarToggle).css('display') === 'none';
16      if ((dropdownHoverAll == true || (dropdownHoverAll == false && notMobileMenu))) { 
17        dropdownToggle.trigger('click');
18      }
19    });
20	
21  });
22});
23
24(function($){
25	$(document).ready(function(){
26		$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
27			event.preventDefault(); 
28			event.stopPropagation(); 
29			$(this).parent().siblings().removeClass('open');
30			$(this).parent().toggleClass('open');
31		});
32	});
33})(jQuery);
34
35if($(window).width() <= 979){
36  $(".dropdown-toggle, .dropdown-submenu > a").attr("href", "javascript:void(0);");    
37}
38
39//Scroll UP
40
41$(document).ready(function(){
42
43  // hide #back-top first
44  $("#back-top").hide();
45
46  // fade in #back-top
47  $(function () {
48    $(window).scroll(function () {
49      if ($(this).scrollTop() > 100) {
50        $('#back-top').fadeIn();
51      } else {
52        $('#back-top').fadeOut();
53      }
54    });
55
56    // scroll body to 0px on click
57    $('#back-top a').click(function () {
58      $('body,html').animate({
59        scrollTop: 0
60      }, 800);
61      return false;
62    });
63  });
64
65});
66
67$(function() {
68  /**
69  * NAME: Bootstrap 3 Multi-Level by Johne
70  * This script will active Triple level multi drop-down menus in Bootstrap 3.*
71  */
72  $('li.dropdown-submenu').on('click', function(event) {
73      event.stopPropagation(); 
74      if ($(this).hasClass('open')){
75          $(this).removeClass('open');
76      }else{
77          $('li.dropdown-submenu').removeClass('open');
78          $(this).addClass('open');
79      }
80  });
81});
82
83//COOKIES
84
85!function(){if(!window.hasCookieConsent){window.hasCookieConsent=!0;var e="cookieconsent_options",t="update_cookieconsent_options",n="cookieconsent_dismissed",i="//s3.amazonaws.com/cc.silktide.com/";if(!(document.cookie.indexOf(n)>-1)){"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var o,s={isArray:function(e){var t=Object.prototype.toString.call(e);return"[object Array]"==t},isObject:function(e){return"[object Object]"==Object.prototype.toString.call(e)},each:function(e,t,n,i){if(s.isObject(e)&&!i)for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e);else for(var r=0,c=e.length;c>r;r++)t.call(n,e[r],r,e)},merge:function(e,t){e&&s.each(t,function(t,n){s.isObject(t)&&s.isObject(e[n])?s.merge(e[n],t):e[n]=t})},bind:function(e,t){return function(){return e.apply(t,arguments)}},queryObject:function(e,t){var n,i=0,o=e;for(t=t.split(".");(n=t[i++])&&o.hasOwnProperty(n)&&(o=o[n]);)if(i===t.length)return o;return null},setCookie:function(e,t,n){var i=new Date;n=n||365,i.setDate(i.getDate()+n),document.cookie=e+"="+t+"; expires="+i.toUTCString()+"; path=/"},addEventListener:function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}},r=function(){var e="data-cc-event",t="data-cc-if",n=function(e,t,i){return s.isArray(t)?s.each(t,function(t){n(e,t,i)}):void(e.addEventListener?e.addEventListener(t,i):e.attachEvent("on"+t,i))},i=function(e,t){return e.replace(/\{\{(.*?)\}\}/g,function(e,n){for(var i,o=n.split("||");token=o.shift();){if(token=token.trim(),'"'===token[0])return token.slice(1,token.length-1);if(i=s.queryObject(t,token))return i}return""})},o=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},r=function(e,t,n){var i=e.parentNode.querySelectorAll("["+t+"]");s.each(i,function(e){var i=e.getAttribute(t);n(e,i)},window,!0)},c=function(t,i){r(t,e,function(e,t){var o=t.split(":"),r=s.queryObject(i,o[1]);n(e,o[0],s.bind(r,i))})},a=function(e,n){r(e,t,function(e,t){var i=s.queryObject(n,t);i||e.parentNode.removeChild(e)})};return{build:function(e,t){s.isArray(e)&&(e=e.join("")),e=i(e,t);var n=o(e);return c(n,t),a(n,t),n}}}
85(),c={options:{message:"This website uses cookies to ensure you get the best experience on our website. ",dismiss:"Got it!",learnMore:"More info",link:null,container:null,theme:"light-floating",markup:['<div class="cc_banner-wrapper {{containerClasses}}">','<div class="cc_banner cc_container cc_container--open">','<a href="#null" data-cc-event="click:dismiss" class="cc_btn cc_btn_accept_all">{{options.dismiss}}</a>','<p class="cc_message">{{options.message}} <a data-cc-if="options.link" class="cc_more_info" href="{{options.link || "#null"}}">{{options.learnMore}}</a></p>','',"</div>","</div>"]},init:function(){var t=window[e];t&&this.setOptions(t),this.setContainer(),this.options.theme?this.loadTheme(this.render):this.render()},setOptionsOnTheFly:function(e){this.setOptions(e),this.render()},setOptions:function(e){s.merge(this.options,e)},setContainer:function(){this.container=this.options.container?document.querySelector(this.options.container):document.body,this.containerClasses="",navigator.appVersion.indexOf("MSIE 8")>-1&&(this.containerClasses+=" cc_ie8")},loadTheme:function(e){var t=this.options.theme;-1===t.indexOf(".css")&&(t=i+t+".css");var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=t;var o=!1;n.onload=s.bind(function(){!o&&e&&(e.call(this),o=!0)},this),document.getElementsByTagName("head")[0].appendChild(n)},render:function(){this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),delete this.element),this.element=r.build(this.options.markup,this),this.container.firstChild?this.container.insertBefore(this.element,this.container.firstChild):this.container.appendChild(this.element)},dismiss:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1,this.setDismissedCookie(),this.container.removeChild(this.element)},setDismissedCookie:function(){s.setCookie(n,"yes")}},a=!1;(o=function(){a||"complete"!=document.readyState||(c.init(),a=!0,window[t]=s.bind(c.setOptionsOnTheFly,c))})(),s.addEventListener(document,"readystatechange",o)}}}();
86
87window.cookieconsent_options = {
88		theme : '/css/bootstrap.min.css',
89		message: 'Este sitio web utiliza cookies analíticas para conocer los hábitos de navegación de los usuarios y así mejorar la calidad del servicio. Si está de acuerdo siga navegando o pulse en "SÍ, acepto".',
90        dismiss: 'SÍ, acepto',
91		learnMore: 'Más Información',
92		link: '/politica-de-cookies'
93    };

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.