‏إظهار الرسائل ذات التسميات jquery. إظهار كافة الرسائل
‏إظهار الرسائل ذات التسميات jquery. إظهار كافة الرسائل

السبت، 11 سبتمبر 2010

SWFUpload jQuery Plugin

When I first stumbled across SWFUpload about two years ago I was impressed by how easy it was to implement. However, their example code has always bugged me as being rather crap, having to assign a separate global event handler for each event, and the lack of multiple handlers for a single event.




Using jQuery (the solution to all things painful), I've written a plugin to create a real event dispatcher for SWFUpload without modifying the SWFUpload core!





The SWFUpload jQuery Plugin

This plugin makes working with SWFUpload easier!



Get straight to the source code at my SWFUpload jQuery Plugin repository on GitHub.



And the benefits are...

■Native jQuery event handling using .bind()

■Ability to assign multiple callbacks per event

■Makes multiple SWFUpload instances on a single page easier to manage

■Ability to completely separate SWFUpload object from UI code (callbacks)

■Assign event handlers before SWFUpload instance is even created!

■No global functions or variables needed!

■A nice, chainable solution!

Live Examples

Here are some live examples you can pull apart. Although the UI is not pretty, it demonstrates how you listen to events, and from there you can create whatever UI you want.



Although these examples upload to a PHP script on my server, the uploaded files are not saved.



■Single Uploader

■Multiple Uploaders

How do I use it?

If you know how to use SWFUpload already, the following should be fairly easy to consume.





$(function(){



$('.swfupload-control').swfupload({

// Backend Settings

upload_url: "../upload.php", // Relative to the SWF file (or you can use absolute paths)



// File Upload Settings

file_size_limit : "102400", // 100MB

file_types : "*.*",

file_types_description : "All Files",

file_upload_limit : "10",

file_queue_limit : "0",



// Button Settings

button_image_url : "../multiinstancedemo/XPButtonUploadText_61x22.png", // Relative to the SWF file

button_placeholder_id : "spanButtonPlaceholder",

button_width: 61,

button_height: 22,



// Flash Settings

flash_url : "../swfupload/swfupload.swf"



});





// assign our event handlers

$('.swfupload-control')

.bind('fileQueued', function(event, file){

// start the upload once a file is queued

$(this).swfupload('startUpload');

})

.bind('uploadComplete', function(event, file){

alert('Upload completed - '+file.name+'!');

// start the upload (if more queued) once an upload is complete

$(this).swfupload('startUpload');

});



});



<div class="swfupload-control">

<span id="spanButtonPlaceholder"></span>

</div>

How does it work?

Rather than creating a SWFUpload instance and assigning handlers directly, it associates the SWFUpload instance with an element in the DOM, and all events handlers are bound to that DOM element.



Calling methods on the SWFUpload instance

The following code will execute the startUpload method on all SWFUpload instances that exist within the selector .your-swfupload-control.





$('.your-swfupload-control').swfupload('startUpload');

Getting properties on the SWFUpload instance

Sometimes you just need to get at the SWFUpload instance... easy!





var swfu = $.swfupload.getInstance('.some-selector-for-your-control');

alert(swfu.settings.custom_settings.your_custom_setting);

Additional event handlers

Due to the way SWFUpload works, all event names must be defined before the SWFUpload instance is created. This means if you are using any plugins that define additional events, you'll need to add them to the handler list before the SWFUpload instance is created.





$.swfupload.additionalHandlers('some_plugin_handler');



The source code

If you missed it the first time, you can download all the source code including all support files and example files from my SWFUpload jQuery Plugin repository on GitHub.



Enjoy!

link to orginal post
http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/
 
thank you

الأربعاء، 8 سبتمبر 2010

50 jquery plugins

Menu


1) LavaLamp









--------------------------------------------------------------------------------



2) jQuery Collapse -A plugin for jQuery to collapse content of div container.





--------------------------------------------------------------------------------



3) A Navigation Menu- Unordered List with anchors and nested lists, also demonstrates how to add a second level list.









--------------------------------------------------------------------------------



4) SuckerFish Style









--------------------------------------------------------------------------------



Tabs

5) jQuery UI Tabs / Tabs 3 – Simple jQuery based tab-navigation









--------------------------------------------------------------------------------



6) TabContainer Theme – JQuery style fade animation that runs as the user navigates between selected tabs.









--------------------------------------------------------------------------------



Accordion

7 ) jQuery Accordion



Demo







--------------------------------------------------------------------------------



8) Simple JQuery Accordion menu









--------------------------------------------------------------------------------



SlideShows

9) jQZoom- allows you to realize a small magnifier window close to the image or images on your web page easily.









--------------------------------------------------------------------------------



10) Image/Photo Gallery Viewer- allows you to take a grouping of images and turn it into an flash-like image/photo gallery. It allows you to style it how ever you want and add as many images at you want.









--------------------------------------------------------------------------------



Transition Effects

11) InnerFade – It’s designed to fade you any element inside a container in and out.









--------------------------------------------------------------------------------



12) Easing Plugin- A jQuery plugin from GSGD to give advanced easing options. Uses Robert Penners easing equations for the transitions





--------------------------------------------------------------------------------



13) Highlight Fade





--------------------------------------------------------------------------------



14) jQuery Cycle Plugin- have very intersting transition effects like image cross-fading and cycling.









--------------------------------------------------------------------------------



jQuery Carousel

15) Riding carousels with jQuery – is a jQuery plugin for controlling a list of items in horizontal or vertical order.



Demo :







--------------------------------------------------------------------------------



Color Picker

16) Farbtastic – is a jQuery plug-in that can add one or more color picker widgets into a page through JavaScript.



Demo :







--------------------------------------------------------------------------------



17) jQuery Color Picker





--------------------------------------------------------------------------------



LightBox

18) jQuery ThickBox – is a webpage user interface dialog widget written in JavaScript.



Demo :







--------------------------------------------------------------------------------



19) SimpleModal Demos – its goal is providing developers with a cross-browser overlay and container that will be populated with content provided to SimpleModal.



Demo :







--------------------------------------------------------------------------------



20) jQuery lightBox Plugin – simple, elegant, unobtrusive, no need extra markup and is used to overlay images on the current page through the power and flexibility of jQuery´s selector.



Demo :







--------------------------------------------------------------------------------



iframe

21) JQuery iFrame Plugin – If javascript is turned off, it will just show a link to the content. Here is the code in action…









--------------------------------------------------------------------------------



Form Validation

22) Validation – A fairly comprehensive set of form validation rules. The plugin also dynamically creates IDs and ties them to labels when they are missing.



Demo :







--------------------------------------------------------------------------------



23) Ajax Form Validation – Client side validation in a form using jQuery. The username will check with the server whether the chosen name is a) valid and b) available.



Demo :







--------------------------------------------------------------------------------



24) jQuery AlphaNumeric – Allows you to prevent your users from entering certain characters inside the form fields.









--------------------------------------------------------------------------------



Form Elements







--------------------------------------------------------------------------------



25) jquery.Combobox – is an unobtrusive way of creating a HTML type combobox from a existing HTML Select element(s), a Demo is here.





--------------------------------------------------------------------------------



26) jQuery Checkbox – Provides for the styling of checkboxes that degrades nicely when javascript is dsiabled.





--------------------------------------------------------------------------------



27) File Style Plugin for jQuery -File Style plugin enables you to use image as browse button. You can also style filename field as normal textfield using css.





--------------------------------------------------------------------------------



Star Rating







--------------------------------------------------------------------------------



28) Simple Star Rating System



29)Half-Star Rating Plugin





--------------------------------------------------------------------------------



ToolTips

30) Tooltip Plugin Examples – A fancy tooltip with some custom positioning, a tooltip with an extra class for nice shadows, and some extra content. You can find a demo here.





--------------------------------------------------------------------------------



31) The jQuery Tooltip







Tables Plugins

32) Zebra Tables Demo -using jQuery to do zebra striping and row hovering, very NICE!!



Demo :







--------------------------------------------------------------------------------



33) Table Sorter Plugin - for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. It can successfully parse and sort many types of data including linked data in a cell.









--------------------------------------------------------------------------------



34) AutoScroll for jQuery -allows for hotspot scrolling of web pages









--------------------------------------------------------------------------------



35) Scrollable HTML table plugin- used to convert tables in ordinary HTML into scrollable ones. No additional coding is necessary.



Demo :





Draggable Droppables And Selectables

36) Sortables - You won’t believe how easy this code to make it easy to sort several lists, mix and match the lists, and send the information to a database.









--------------------------------------------------------------------------------



37) Draggables and droppables- A good example of using jQuery plugin iDrop to drag and drop tree view nodes.









--------------------------------------------------------------------------------



Style Switcher

38) Switch stylesheets with jQuery- allows your visitors to choose which stylesheet they would like to view your site with. It uses cookies so that when they return to the site or visit a different page they still get their chosen stylesheet. A Demo is here.





--------------------------------------------------------------------------------



Rounded Corners

39) jQuery Corner Demo









--------------------------------------------------------------------------------



40) JQuery Curvy Corners- A plugin for rounded corners with smooth, anti-aliased corners.









--------------------------------------------------------------------------------



Must See jQuery Examples

41) jQuery Air – A passenger management interface for charter flights. A great Tutorial that you will enjoy.



Demo :







--------------------------------------------------------------------------------



42) HeatColor -allows you to assign colors to elements, based on a value derived from that element. The derived value is compared to a range of values, it can find the min and max values of the desired elements, or you can pass them in manually.



Demo :







--------------------------------------------------------------------------------



43) Simple jQuery Examples -This page contains a growing set of Query powered script examples in "pagemod" format. The code that is displayed when clicking "Source" is exactly the same Javascript code that powers each example. Feel free to save a copy of this page and use the example.





--------------------------------------------------------------------------------



44) Date Picker -A flexible unobtrusive calendar component for jQuery.



Demo :







--------------------------------------------------------------------------------



45) ScrollTo -A plugin for jQuery to scroll to a certain object in the page





--------------------------------------------------------------------------------



46) 3-Column Splitter Layout -this is a 3-column layout using nested splitters. The left and right columns are a semi-fixed width; the center column grows or shrinks. Page scroll bars have been removed since all the content is inside the splitter, and the splitter is anchored to the bottom of the window using an onresize event handler.









--------------------------------------------------------------------------------



47) Pager jQuery -Neat little jQuery plugin for a a paginated effect.









--------------------------------------------------------------------------------



48) Select box manipulation





--------------------------------------------------------------------------------



49) Cookie Plugin for jQuery



50) JQuery BlockUI Plugin -lets you simulate synchronous behavior when using AJAX, without locking the browser. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.





الاثنين، 6 سبتمبر 2010

SWFUpload jQuery Plugin رفع الملفات بواسطة الجى قيورى

SWFUpload jQuery Plugin
When I first stumbled across SWFUpload about two years ago I was impressed by how easy it was to implement. However, their example code has always bugged me as being rather crap, having to assign a separate global event handler for each event, and the lack of multiple handlers for a single event.

Using jQuery (the solution to all things painful), I've written a plugin to create a real event dispatcher for SWFUpload without modifying the SWFUpload core!


The SWFUpload jQuery Plugin
This plugin makes working with SWFUpload easier!

Get straight to the source code at my SWFUpload jQuery Plugin repository on GitHub.

And the benefits are...
■Native jQuery event handling using .bind()
■Ability to assign multiple callbacks per event
■Makes multiple SWFUpload instances on a single page easier to manage
■Ability to completely separate SWFUpload object from UI code (callbacks)
■Assign event handlers before SWFUpload instance is even created!
■No global functions or variables needed!
■A nice, chainable solution!
Live Examples
Here are some live examples you can pull apart. Although the UI is not pretty, it demonstrates how you listen to events, and from there you can create whatever UI you want.

Although these examples upload to a PHP script on my server, the uploaded files are not saved.

■Single Uploader
■Multiple Uploaders
How do I use it?
If you know how to use SWFUpload already, the following should be fairly easy to consume.


$(function(){

$('.swfupload-control').swfupload({
// Backend Settings
upload_url: "../upload.php", // Relative to the SWF file (or you can use absolute paths)

// File Upload Settings
file_size_limit : "102400", // 100MB
file_types : "*.*",
file_types_description : "All Files",
file_upload_limit : "10",
file_queue_limit : "0",

// Button Settings
button_image_url : "../multiinstancedemo/XPButtonUploadText_61x22.png", // Relative to the SWF file
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,

// Flash Settings
flash_url : "../swfupload/swfupload.swf"

});


// assign our event handlers
$('.swfupload-control')
.bind('fileQueued', function(event, file){
// start the upload once a file is queued
$(this).swfupload('startUpload');
})
.bind('uploadComplete', function(event, file){
alert('Upload completed - '+file.name+'!');
// start the upload (if more queued) once an upload is complete
$(this).swfupload('startUpload');
});

});


How does it work?
Rather than creating a SWFUpload instance and assigning handlers directly, it associates the SWFUpload instance with an element in the DOM, and all events handlers are bound to that DOM element.

Calling methods on the SWFUpload instance
The following code will execute the startUpload method on all SWFUpload instances that exist within the selector .your-swfupload-control.


$('.your-swfupload-control').swfupload('startUpload');
Getting properties on the SWFUpload instance
Sometimes you just need to get at the SWFUpload instance... easy!


var swfu = $.swfupload.getInstance('.some-selector-for-your-control');
alert(swfu.settings.custom_settings.your_custom_setting);
Additional event handlers
Due to the way SWFUpload works, all event names must be defined before the SWFUpload instance is created. This means if you are using any plugins that define additional events, you'll need to add them to the handler list before the SWFUpload instance is created.


$.swfupload.additionalHandlers('some_plugin_handler');

The source code
If you missed it the first time, you can download all the source code including all support files and example files from my SWFUpload jQuery Plugin repository on GitHub.

Enjoy!


رابط الموضوع : http://github.com/ifunk/swfupload-jquery-plugin/tree/master

jQuery Alert Dialogs رسائل تحذير مع رسائل نجاح بالجى قيورى

jQuery Alert Dialogs
Cory S.N. LaViska (creator of one of my favorite jQuery Plugins – contextMenu.js) released version 1.0 of jQuery Alert Dialogs a few days ago. It looked interesting and worth some investigation. To test things out I decided to try and recreate the dialogs from one of my earlier posts ASP.NET Popup Message Box User Control which was originally based off a post by Janko.

Cory’s new plugin “aims to replace the basic functionality provided by the standard JavaScript alert(), confirm(), and prompt() functions.” I believe he achieved this in a good looking manner that is straightforward and simple to implement. The title and message of the dialog can be set before they are called. The dialog is also draggable when the jquery ui draggable plugin is included. Finally, the dialogs are dismissed in most browsers when the enter or esc key is pressed.

I really wanted to have the four types of alerts from my earlier post though (warning, error, success and info) since I use them all the time. It was pretty easy to tweak Cory’s CSS and the plugin to pass in the type of alert I wanted. You will find my modified version of the plugin in the download.

Live Demo | Download (HTML, CSS and jQuery)


Screenshot of End Product:













To call Cory’s version of the alert dialog the following is used jAlert('This is a custom alert box', 'Alert Dialog'); where the first parameter is the message and the second is the title. In my version jAlert('error', 'This is the error dialog box with some extra text.', 'Error Dialog'); I just pass in the type of alert I want (error, warning, success or info) as the first parameter and then the message and title.

In an upcoming post I will show you an easy way to set these dialogs up to fire after a postback and probably how to use them with Cory’s contextMenu.js plugin.

For more details on the jQuery Alert Dialog plugin, be sure to see Cory’s website. Also be sure to checkout the demo and download.

رابط التحميل http://beckelman.net/file.axd?file=jQueryAlertDialogs.zip
رابط التجربة http://beckelman.net/Demos/jQueryAlertDialogs/Default.aspx