Lee un archivo json y añade la lista de opciones a un elemento select
Reading json file and append list options into element select
| { | |
| "videos": [ | |
| { | |
| "Titulo": "RESPONSIVE WEB DESIGN CON BOOTSTRAP", | |
| "Tiempo": "01:07:20", | |
| "Final": "si" | |
| }, | |
| { | |
| "Titulo": "Presentación", | |
| "Tiempo": "00:03:20", |
| .ocupado { | |
| cursor: wait !important; | |
| } |
| // RECORDAR QUE HAY QUE AÑADIR LA CLASE .over A LAS ETIQUETAS IMG | |
| // LAS IMÁGENES QUE SE INTERCAMBIAN TIENEN LA CLAVE -ON | |
| // EJEMPLO: <img class="over" src="archivo.png"> | |
| $('img.over').each(function(){ | |
| var t=$(this); | |
| var src1= t.attr('src'); // inicial src | |
| var newSrc = src1.substring(0, src1.lastIndexOf('.')); // obtiene el nombre sin extension |
| // Add a CSS class to a specific element | |
| $('#myelement').addClass('myclass'); | |
| // Removing a CSS class from a specific element | |
| $('#myelement').removeClass('myclass'); | |
| // Check if a specific element has a CSS class |
| $(document).on('ready',function (){ | |
| $(".faded").hide().delay(500).fadeTo('fast',1); | |
| }); | |
| $("").click(function (event) { | |
| }); |
| var root = location.protocol + '//' + location.host; | |
| $('a').not(':contains(root)').click(function(){ | |
| this.target = "_blank"; | |
| }) |
| //get cookie | |
| function getCookie( name ) { | |
| var start = document.cookie.indexOf( name + "=" ); | |
| var len = start + name.length + 1; | |
| if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) { | |
| return null; | |
| } | |
| if ( start == -1 ) return null; | |
| var end = document.cookie.indexOf( ';', len ); | |
| if ( end == -1 ) end = document.cookie.length; |
Lee un archivo json y añade la lista de opciones a un elemento select
Reading json file and append list options into element select
| <!-- Example 1: Non-Conflicting jQuery --> | |
| jQuery(document).ready(function(){ | |
| jQuery("#jqtest").click( function() { | |
| alert("jQuery is working!"); | |
| }); | |
| }); | |
| <!-- ******************************************************* --> |