jQuery liteDialog is a very lightweight modal dialog plugin for jQuery. It is designed as a "don't care about the features, I just want to show a small message" plugin.
Download the source on github or open the sample quickly to see how it looks.
jQuery.liteDialog.js weighs 1.5 kB, minified and requires only one file. It is designed to be simple to deploy and use the dazzling, but also contains several basic options should you need them.
By default, this is only the overlay black shadow across the page and opens a dialog box in the middle of the screen with the html content that you specify. Dialogue may be revoked, click or press escape.
Basic use: liteDialog
/* This is the most basic way to connect an event listener that fires liteDialog */$(' # normal ').click(function(){ $.liteDialog()"this is the normal liteDialog.");});/* This example sets some custom options you can customize to showhow liteDialog adapted to the needs. */$()' # funky ').click(function(){ $.liteDialog(){ html:this liteDialog has a few hundred custom options. ", shadow:' red ', the width of the:' Image: name of .jpg | 200px | ', shadowRadius:'20px', pozadí:' # 00FFCC', barvy:'blue', výpln:0, zIndex:9000});});/* This shows how to load content into the liteDialog of the element on the page */$(' # element ').click(function(){ $.liteDialog({ html: $('#dialog').html()});});/* This shows how to load content via Ajax in liteDialog */$(' # ajax ').click(function(){ $.získat()". /the htmlajax_dialog. ",function(), data, textStatus, jqXHR){ $.liteDialog({ html:});});});/* This example specifies the option, which means that, in the dialog box could not be bedismissed with the exception of using JavaScript */$(' # modal ').click(function(){ $.liteDialog(){ html:' this liteDialog cannot be dismissed except\ using JavaScript-in this example we\ 'in setTimeout refuse, after 4 seconds., modal:true}); setTimeout(function(){ $.liteDialog('hide');},4000);});
So that's it. Module actually easy jQuery simple dialog. Nothing seemed to just slap in a job.
Why use liteDialog?
There are hundreds of simple dialogue jquery plugins, and so on. But they are all rather meaty-billed itself as "very slight", but included 3.4 kB minified JS, 3 kB image and CSS file. That's not what I expect to find for the plugin easy dialogue. So I spent a little time for writing liteDialog with bare minimum functionality.
If you want to load a spinner while precaches images for you before you change the size to the correct dimensions, look elsewhere. If you want to simply classy warning window, liteDialog is for you.
Thanks: Twist digital media predictions and allows you to open the source of this plugin that was written in the working time. If you have a horse racing related Web project, if no one else can help, and if you find them, maybe you can hire the team Twist.
Related posts:
This entry was posted on 3. April 2011, 10: 45 am and is filed under javascript. You can follow any responses to this entry through the RSS 2.0 You can have a response, or trackback from your own Web site.