Вход Регистрация
Файл: js/colordlg/layout.js
Строк: 58
<?php
(function($){
    var 
initLayout = function() {
        var 
hash window.location.hash.replace('#''');
        var 
currentTab = $('ul.navigationTabs a')
                            .
bind('click'showTab)
                            .
filter('a[rel=' hash ']');
        if (
currentTab.size() == 0) {
            
currentTab = $('ul.navigationTabs a:first');
        }
        
showTab.apply(currentTab.get(0));
        $(
'#colorpickerHolder').ColorPicker({flattrue});
        $(
'#colorpickerHolder2').ColorPicker({
            
flattrue,
            
color'#00ff00',
            
onSubmit: function(hsbhexrgb) {
                $(
'#colorSelector2 div').css('backgroundColor''#' hex);
            }
        });
        $(
'#colorpickerHolder2>div').css('position''absolute');
        var 
widt false;
        $(
'#colorSelector2').bind('click', function() {
            $(
'#colorpickerHolder2').stop().animate({heightwidt 173}, 500);
            
widt = !widt;
        });
        $(
'#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
            
onSubmit: function(hsbhexrgbel) {
                $(
el).val(hex);
                $(
el).ColorPickerHide();
            },
            
onBeforeShow: function () {
                $(
this).ColorPickerSetColor(this.value);
            }
        })
        .
bind('keyup', function(){
            $(
this).ColorPickerSetColor(this.value);
        });
        $(
'#colorSelector').ColorPicker({
            
color'#0000ff',
            
onShow: function (colpkr) {
                $(
colpkr).fadeIn(500);
                return 
false;
            },
            
onHide: function (colpkr) {
                $(
colpkr).fadeOut(500);
                return 
false;
            },
            
onChange: function (hsbhexrgb) {
                $(
'#colorSelector div').css('backgroundColor''#' hex);
            }
        });
    };
    
    var 
showTab = function(e) {
        var 
tabIndex = $('ul.navigationTabs a')
                            .
removeClass('active')
                            .
index(this);
        $(
this)
            .
addClass('active')
            .
blur();
        $(
'div.tab')
            .
hide()
                .
eq(tabIndex)
                .
show();
    };
    
    
EYE.register(initLayout'init');
})(
jQuery)
?>
Онлайн: 2
Реклама