Вход Регистрация
Файл: Luxe-Shop v6.0/assets/js/init.js
Строк: 151
<?php
/*
    Tessellate by HTML5 UP
    html5up.net | @n33co
    Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

(function($) {

    
skel.init({
        
reset'full',
        
breakpoints: {
            
'global': { range'*'href'css/style.css'containers1360grid: { gutters50 } },
            
'wide': { range'-1680'href'css/style-wide.css'containers1200grid: { gutters40 } },
            
'normal': { range'-1280'href'css/style-normal.css'containers960grid: { gutters30 } },
            
'narrow': { range'-1000'href'css/style-narrow.css'containers'100%'grid: { gutters25collapsetrue } },
            
'mobile': { range'-736'href'css/style-mobile.css'grid: { gutters10 }, viewport: { scalablefalse } }
        }
    });

    $(function() {

        var    
$window = $(window),
            
$body = $('body');
            
        
// Disable animations/transitions until the page has loaded.
            
$body.addClass('is-loading');
            
            
$window.on('load', function() {
                
$body.removeClass('is-loading');
            });
            
        
// Forms (IE<10).
            
var $form = $('form');
            if (
$form.length 0) {

                
$form.find('.form-button-submit')
                    .
on('click', function() {
                        $(
this).parents('form').submit();
                        return 
false;
                    });

                if (
skel.vars.IEVersion 10) {
                    $.
fn.n33_formerize=function(){var _fakes=new Array(),_form = $(this);_form.find('input[type=text],textarea').each(function() { var = $(this); if (e.val() == '' || e.val() == e.attr('placeholder')) { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).blur(function() { var = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } }).focus(function() { var = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) return; if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); _form.find('input[type=password]').each(function() { var = $(this); var = $($('<div>').append(e.clone()).remove().html().replace(/type="password"/i'type="text"').replace(/type=password/i'type=text')); if (e.attr('id') != ''x.attr('id'e.attr('id') + '_fakeformerizefield'); if (e.attr('name') != ''x.attr('name'e.attr('name') + '_fakeformerizefield'); x.addClass('formerize-placeholder').val(x.attr('placeholder')).insertAfter(e); if (e.val() == ''e.hide(); else x.hide(); e.blur(function(event) { event.preventDefault(); var = $(this); var e.parent().find('input[name=' e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } }); x.focus(function(event) { event.preventDefault(); var = $(this); var x.parent().find('input[name=' x.attr('name').replace('_fakeformerizefield''') + ']'); x.hide(); e.show().focus(); }); x.keypress(function(event) { event.preventDefault(); x.val(''); }); });  _form.submit(function() { $(this).find('input[type=text],input[type=password],textarea').each(function(event) { var = $(this); if (e.attr('name').match(/_fakeformerizefield$/)) e.attr('name'''); if (e.val() == e.attr('placeholder')) { e.removeClass('formerize-placeholder'); e.val(''); } }); }).bind("reset", function(event) { event.preventDefault(); $(this).find('select').val($('option:first').val()); $(this).find('input,textarea').each(function() { var = $(this); var xe.removeClass('formerize-placeholder'); switch (this.type) { case 'submit': case 'reset': break; case 'password'e.val(e.attr('defaultValue')); e.parent().find('input[name=' e.attr('name') + '_fakeformerizefield]'); if (e.val() == '') { e.hide(); x.show(); } else { e.show(); x.hide(); } break; case 'checkbox': case 'radio'e.attr('checked'e.attr('defaultValue')); break; case 'text': case 'textarea'e.val(e.attr('defaultValue')); if (e.val() == '') { e.addClass('formerize-placeholder'); e.val(e.attr('placeholder')); } break; default: e.val(e.attr('defaultValue')); break; } }); window.setTimeout(function() { for (x in _fakes_fakes[x].trigger('formerize_sync'); }, 10); }); return _form; };
                    
$form.n33_formerize();
                }

                
// Custom select.
                    
$form.find('.select select')
                        .
on('focus', function() {
                            $(
this).parent().addClass('focus');
                        })
                        .
on('blur', function() {
                            $(
this).parent().removeClass('focus');
                        });                        

            }
            
        
// CSS polyfills (IE<9).
            
if (skel.vars.IEVersion 9)
                $(
':last-child').addClass('last-child');

        
// Scrolly links.
            
$('.scrolly').scrolly();

    });

})(
jQuery);
?>
Онлайн: 1
Реклама