Splash menu is very significant in making web design for the opening of this website to attract visitors so that visitors can surf our site following is a sample script we are making a splash with jQuery
(function($){
    
    $.fn.splashScreen = function(settings){
        
        // Providing default options:
        
        settings = $.extend({
            textLayers        : [],
            textShowTime    : 1500,
            textTopOffset    : 80
        },settings);
        
        var promoIMG = this;
        // Creating the splashScreen div.
        // The rest of the styling is in splashscreen.css
        
        var splashScreen = $('<div>',{
            id    : 'splashScreen',
            css:{
                backgroundImage        : promoIMG.css('backgroundImage'),
                backgroundPosition    : 'center '+promoIMG.offset().top+'px',
                height                : $(document).height()
            }
        });
        
        $('body').append(splashScreen);
        
        splashScreen.click(function(){
            splashScreen.fadeOut('slow');
        });
        
        // Binding a custom event for changing the current visible text according 
        // to the contents of the textLayers array (passed as a parameter)
        
        splashScreen.bind('changeText',function(e,newID){
            
            // If the image that we want to show is
            // within the boundaries of the array:
            
            if(settings.textLayers[newID]){
                showText(newID);
            }
            else {
                splashScreen.click();
            }
        });    
    
        splashScreen.trigger('changeText',0);
    
        // Extracting the functionality as a 
        // separate function for convenience.
        
        function showText(id){
            var text = $('<img>',{
                src:settings.textLayers[id],
                css: {
                    marginTop : promoIMG.offset().top+settings.textTopOffset
                }
            }).hide();
            
            text.load(function(){
                text.fadeIn('slow').delay(settings.textShowTime).fadeOut('slow',function(){
                    text.remove();
                    splashScreen.trigger('changeText',[id+1]);
                });
            });
            
            splashScreen.append(text);
        }
        
        return this;
    }
    
})(jQuery);
Tuesday, February 14, 2012
Creating a Menu Splash With JQuery
Related Articles :
Creat a speackers using CORELDRAW X4hi again in this tu tutorial you see how we can creat speackers using coreldraw x4 So download the CDR file here ...  
Windows Cannot be Installed to this Disk the selected Disk is of the GPT styleTutorial Aprils, Biasanya instal sistem perasi windows itu sangatlah muda, karena interfacenya sudah GUI cukup next dan next selesai d ...  
Why Should Adobe AIRThe Adobe® AIR® runtime enables developers to deploy standalone applications built with HTML, JavaScript, ActionScript®, Flex, Adobe F ...  
Create an envelpe icon CorelDraw x4 Tutorial In this tutorial we're going to create an envelpe icon usin corel draw x4STEP-1 Draw to rectangles with 5 in angles like thisnow chos ...  
tutorial membuat mock up di corel dan photoshop Langkah-langkah membuat design mockup? untuk membuat design mockup secara cepat dan praktis yaitu cukup menggunakan template mockup ki ...  
Subscribe to:
Post Comments (Atom)
0 komentar:
Post a Comment