Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 36: | Rivi 36: | ||
var images = jQuery( '<div class="card-columns jwImageSelect_images"></div>' ); | var images = jQuery( '<div class="card-columns jwImageSelect_images"></div>' ); | ||
select.after( images ); | select.after( images ); | ||
var | var values = []; | ||
select.find( 'option' ).each( function() { | |||
var val = jQuery( this ).val(); | |||
values.push( val ); | |||
} | |||
for ( var vi in values ) { | |||
for ( var | |||
//select.find( 'option' ).each( function() { | //select.find( 'option' ).each( function() { | ||
console.log( | console.log( vi ); | ||
var option = | //var option = values[ vi ]; | ||
var page = options.text(); //jQuery( this ).text(); | //var page = options.text(); //jQuery( this ).text(); | ||
var value = options.val(); //jQuery( this ).val(); | //var value = options.val(); //jQuery( this ).val(); | ||
searchImg = "action=query&prop=imageinfo&iiprop=url|size&format=json&titles=" + encodeURIComponent( | var value = values[ vi ]; | ||
searchImg = "action=query&prop=imageinfo&iiprop=url|size&format=json&titles=" + encodeURIComponent( value ); | |||
console.log( value ); | console.log( value ); | ||
jQuery.ajax({ | jQuery.ajax({ | ||


