image_select_box: a select shown as clickable thumbnails (image-picker),
laid out by Masonry once imagesLoaded reports the images. Classes: yf_form2, yf_html.
return function () {
$intro = '<p class="docs-demo-intro"><code>image_select_box</code>: a select shown as clickable thumbnails (image-picker),
laid out by Masonry once imagesLoaded reports the images. Classes: <code>yf_form2</code>, <code>yf_html</code>.</p>';
$svg = function ($color) {
return 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" width="80" height="60"><rect width="80" height="60" fill="' . $color . '"/></svg>');
};
$images = ['red' => $svg('#c33'), 'green' => $svg('#3c3'), 'blue' => $svg('#33c')];
return $intro . form(['no_form' => 0], ['id' => 'jquery_image_picker_form'])
->image_select_box('jq_image', $images, ['desc' => 'Image picker'])
->save();
};
image_select_box: a select shown as clickable thumbnails (image-picker),
laid out by Masonry once imagesLoaded reports the images. Classes: yf_form2, yf_html.