function magicMatch(text) {
var matches = text.match(/^[^\,]+\,.+\((.+)\)$/);
if (matches && matches[1]) {
return matches[1];
}
return text;
}
console.log( magicMatch('Saglek, CA (YSV)') ); // YSV
console.log( magicMatch('Saglek Xxx city, CA (YSV)') ); // YSV
console.log( magicMatch('Saglek') ); // Saglek
console.log( magicMatch('Saglek ` Great City (town-city)') ); // Saglek ` Great City (town-city)
Реализуйте систему для показа презентаций. Подумайте над тем, как реализовать переключение слайдов, навигацию. Предусмотрите возможность размещения нескольких презентаций на одной странице. Рекомендуется использование jQuery.
“CSS3 Flying Images Carousel”
It should be a single web page with a set of the .js, .css, and image resources located in the
same directory.
NOTE: This task is intended to demonstrate JavaScript and DOM programming skills, so
NO external JS frameworks should be used. All work should be performed in the browser, NO
server side scripting is allowed.
Create a “CSS3 Flying Images Carousel” using available CSS3 transformation effects (-moz- and -webkit-), CSS3 animations, CSS3 shadows, gradients and reflections, and some reasonable JavaScripting (no HTML5 canvas usage is allowed). The solution should support infinite number of the images. It should cache up to 5 images in each direction, unload unnecessary ones and preload required ones. There should be no more than 11 images loaded in the page at the same time. Transition between images should be performed by pressing Left/Right keys on keyboard. Left and right images should be displayed with perspective. During transition to the right, the left image should flight out of the scene, the center image should become the left one, the right image should take central position and new image should take the place of the right one. Transition animation should not hang up during next image loading. In case of very fast scrolling — loading indicator should appear until necessary number of images are loaded. Any alternative scene layouts and/or animations flow are welcome!