[et_pb_section fb_built="1" fullwidth="on" admin_label="Section" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" template_type="section"][et_pb_fullwidth_slider admin_label="SliderUCS" module_id="sliderucs" _builder_version="4.19.2" _module_preset="default" background_image="https://salud.campeche.gob.mx/wp-content/uploads/2022/12/fondorojo-1.jpg" custom_button="on" button_text_color="#FFFFFF" animation_style="fade" animation_delay="100ms" auto="on" link_option_url_new_window="on" global_colors_info="{}"][et_pb_slide heading="Your Title Goes Here" button_text="Leer Más" image="https://democampeche.campeche.gob.mx/wp-content/uploads/2022/10/regreso-clases-campeche.jpeg" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" sticky_transition="on"]<p>Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.</p>[/et_pb_slide][et_pb_slide heading="Your Title Goes Here" button_text="Leer Más" image="https://democampeche.campeche.gob.mx/wp-content/uploads/2022/10/educacion-alternativa-barcelona_11_1000x528.jpeg" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" sticky_transition="on"]<p>Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.</p>[/et_pb_slide][et_pb_slide heading="Your Title Goes Here" button_text="Leer Más" image="https://democampeche.campeche.gob.mx/wp-content/uploads/2022/10/inscripciones-para-primaria-2021.jpeg" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" sticky_transition="on"]<p>Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.</p>[/et_pb_slide][et_pb_slide heading="Your Title Goes Here" button_text="Leer Más" image="https://democampeche.campeche.gob.mx/wp-content/uploads/2022/10/cuartoscuro_810669_digital.jpg" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" sticky_transition="on"]<p>Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.</p>[/et_pb_slide][et_pb_slide heading="Your Title Goes Here" button_text="Leer Más" image="https://democampeche.campeche.gob.mx/wp-content/uploads/2023/04/banner_principal.png" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}" sticky_transition="on"]<p>Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.</p>[/et_pb_slide][/et_pb_fullwidth_slider][et_pb_fullwidth_code admin_label="JS Contenido UCS" _builder_version="4.19.2" _module_preset="default" global_colors_info="{}"]<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script><!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] --><script type="text/javascript"><!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->const slideucs = document.getElementById("sliderucs");<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  const slider = document.querySelector("#sliderucs"); <!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  //const divs = document.querySelectorAll(" #sliderucs  div");<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  const divs = document.querySelectorAll(".et_pb_slides  div");  <!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->$( document ).ready(function() {<!-- [et_pb_line_break_holder] -->//    console.log( "ready!" );<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->var obtener_imagen_noticia_ucs = function( url_noticia ) {<!-- [et_pb_line_break_holder] -->   // var text = greeting + ', ' + person;<!-- [et_pb_line_break_holder] -->   // return text;<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  $.ajax({<!-- [et_pb_line_break_holder] -->    // la URL para la petición<!-- [et_pb_line_break_holder] -->    url : url_noticia,<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // la información a enviar<!-- [et_pb_line_break_holder] -->    // (también es posible utilizar una cadena de datos)<!-- [et_pb_line_break_holder] -->    //data : { id : 123 },<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // especifica si será una petición POST o GET<!-- [et_pb_line_break_holder] -->    type : 'GET',<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // el tipo de información que se espera de respuesta<!-- [et_pb_line_break_holder] -->    dataType : 'json',<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // código a ejecutar si la petición es satisfactoria;<!-- [et_pb_line_break_holder] -->    // la respuesta es pasada como argumento a la función<!-- [et_pb_line_break_holder] -->    success : function(json) {<!-- [et_pb_line_break_holder] -->        <!-- [et_pb_line_break_holder] -->      	return imagen;<!-- [et_pb_line_break_holder] -->    },<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // código a ejecutar si la petición falla;<!-- [et_pb_line_break_holder] -->    // son pasados como argumentos a la función<!-- [et_pb_line_break_holder] -->    // el objeto de la petición en crudo y código de estatus de la petición<!-- [et_pb_line_break_holder] -->    error : function(xhr, status) {<!-- [et_pb_line_break_holder] -->        alert('Disculpe, existió un problema');<!-- [et_pb_line_break_holder] -->    },<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->});<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->};  <!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->  $.ajax({<!-- [et_pb_line_break_holder] -->    // la URL para la petición<!-- [et_pb_line_break_holder] -->    url : 'https://ucs.campeche.gob.mx/wp-json/wp/v2/posts?_fields[]=author&_fields[]=id&_fields[]=excerpt&_fields[]=title&_fields[]=link&_fields[]=content&_fields[]=modified&_fields[]=featured_media&_fields[]=_links&_fields[]=yoast_head_json&per_page=5',<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // la información a enviar<!-- [et_pb_line_break_holder] -->    // (también es posible utilizar una cadena de datos)<!-- [et_pb_line_break_holder] -->    //data : { id : 123 },<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // especifica si será una petición POST o GET<!-- [et_pb_line_break_holder] -->    type : 'GET',<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // el tipo de información que se espera de respuesta<!-- [et_pb_line_break_holder] -->    dataType : 'json',<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // código a ejecutar si la petición es satisfactoria;<!-- [et_pb_line_break_holder] -->    // la respuesta es pasada como argumento a la función<!-- [et_pb_line_break_holder] -->    success : function(json) {<!-- [et_pb_line_break_holder] -->     //   $('<h1/>').text(json.title).appendTo('body');<!-- [et_pb_line_break_holder] -->     //   $('<div class="content"/>')<!-- [et_pb_line_break_holder] -->     //       .html(json.html).appendTo('body');<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->      console.log( json ) ;<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->   //   console.log( json[0].id );<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->      console.log( json[0].id + ' ' + json[0].link + ' ' + json[0].title['rendered'] + '  ' + json[0]._links.about[0].href + ' ' + json[0]._links["wp:attachment"][0].href + ' ' + json[0].yoast_head_json.og_image[0].url ) ;<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->        for (var i=0; i<json.length; i++) {<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          //$("#sliderucs [src='et_pb_slide_" + i + "'] h2"  ).html( json[i].title['rendered'] );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          console.log("sliderucs [data-slide-id='et_pb_slide_" + i + "'] h2" );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          $("#sliderucs [data-slide-id='et_pb_slide_" + i + "'] h2 "  ).html( json[i].title['rendered'] );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          $("#sliderucs [data-slide-id='et_pb_slide_" + i + "'] p "  ).html( json[i].yoast_head_json.og_description );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          $("#sliderucs [data-slide-id='et_pb_slide_" + i + "'] img "  ).attr( 'src', json[i].yoast_head_json.og_image[0].url );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          $("#sliderucs [data-slide-id='et_pb_slide_" + i + "'] img "  ).attr( 'srcset', '');<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          $("#sliderucs [data-slide-id='et_pb_slide_" + i + "'] a "  ).attr( 'href', json[i].link );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          //$("#noticias" + i + " h2 ").html( json[i].title['rendered'] );	<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          //console.log( );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          //$("#noticias" + i + " a ").attr( 'href', json[i].link );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          if( i < 4 ){<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->           // $("#noticias" + i ).attr( 'style', 'background-image: url("'+ json[i].yoast_head_json.og_image[0].url +'"); z-index: 0; opacity: 0;' );<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->          }<!-- [et_pb_line_break_holder] -->          else{<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->           // $("#noticias" + i ).attr( 'style', 'background-image: url("'+ json[i].yoast_head_json.og_image[0].url +'"); z-index: 1; opacity: 1;' );<!-- [et_pb_line_break_holder] -->            <!-- [et_pb_line_break_holder] -->          }<!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->          <!-- [et_pb_line_break_holder] -->        }<!-- [et_pb_line_break_holder] -->      <!-- [et_pb_line_break_holder] -->    }, <!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // código a ejecutar si la petición falla;<!-- [et_pb_line_break_holder] -->    // son pasados como argumentos a la función<!-- [et_pb_line_break_holder] -->    // el objeto de la petición en crudo y código de estatus de la petición<!-- [et_pb_line_break_holder] -->    error : function(xhr, status) {<!-- [et_pb_line_break_holder] -->        alert('Disculpe, existió un problema');<!-- [et_pb_line_break_holder] -->    }//,<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    // código a ejecutar sin importar si la petición falló o no<!-- [et_pb_line_break_holder] -->    //complete : function(xhr, status) {<!-- [et_pb_line_break_holder] -->    //    alert('Petición realizada');<!-- [et_pb_line_break_holder] -->    <!-- [et_pb_line_break_holder] -->    //}<!-- [et_pb_line_break_holder] -->});<!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] -->});  <!-- [et_pb_line_break_holder] -->  <!-- [et_pb_line_break_holder] --></script>  [/et_pb_fullwidth_code][/et_pb_section]