Aklımda Kalası Kelimeler

* давайте работать вместе
* Zarf ve Mazruf, Zerafet(xHoyratlık) ile aynı kökten(za-ra-fe) gelir
* Bedesten
* Suç subuta ermiştir - Suç sabit olmuştur
toggleClass etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
toggleClass etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

16 Ocak 2010 Cumartesi

JQuery Events

Referans: asimsajjad.blogspot.com

http://docs.jquery.com/Events/live

Live (and Die) Event in Jquery(1.3)

Önce desteklenen OLAYlar (Events):

Event Type
Event Type
click
dbclick
mousedownmouseup
mousemovemouseover
mouseoutkeyup
keydownkeypress


Ve henüz desteklenmeyen OLAYLAR:
Event Type
Event Type
blur
focus
mouseenter
mouseleave
change
submit


Ve bir örnek:

function ff() {
$().ready(function() {
var intCounter = 1;
$("p").live("click", ParagraphClick);
$("#cmdBind").click(function() {
$("p").live("click", ParagraphClick);
});

$("#cmdUnbind").click(function() {
$("p").die("click", ParagraphClick);
});

function ParagraphClick() {
$(this).after("Paragraph Number:" + intCounter + "");
intCounter++;
}
});
}




JQUERY AJAX Events


http://docs.jquery.com/API/1.1/AJAX

Calling $.ajax

$.ajax() takes one argument, an object of key/value pairs, that are used to initalize and handle the request, and returns the XMLHttpRequest object for post-processing (like manual aborting) if needed.

Options: Several options that control the behavior of $.ajax are available. They are specified as key/value pairs of the 'parameters' object passed to $.ajax:

* (String) url - The URL to request.

* (String) type - The type of request to make ("POST" or "GET"), default is "GET".

* (String) dataType - The type of data that you're expecting back from the server. If none is specified, jQuery will intelligently pass either responseXML or responseText to your success callback, based on the MIME type of the response. If "xml" is in the MIME type, jQuery will pass the responseXML to your callback, otherwise you'll get the responseText.

* (Boolean) ifModified - Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header.

* (Number) timeout - Set a local timeout for the request. This will override the global timeout, if one is set via $.ajaxTimeout. For example, you could use this property to give a single request a longer timeout than all other requests that you've set to time out in one second. See $.ajaxTimeout() for global timeouts.

* (Boolean) global - Whether to trigger global AJAX event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered.

* (Function) error - A function to be called if the request fails. The function gets passed three arguments: The XMLHttpRequest object, a string describing the type of error that occurred and an optional exception object, if one occured.

* (Function) success - A function to be called if the request succeeds. The function gets passed one argument: The data returned from the server, formatted according to the 'dataType' parameter.

* (Function) complete - A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of success of the request.

* (Object|String) data - Data to be sent to the server. It is converted to a query string, if not already a string. Is appended to the url for GET-requests. See processData option to prevent this automatic processing.

* (String) contentType - When sending data to the server, use this content-type. Default is "application/x-www-form-urlencoded", which is fine for most cases.

* (Boolean) processData - By default, data passed in to the 'data' option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments or other non-processed data, set this option to false.

* (Boolean) async - By default, all requests are send asynchronous (set to true). If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active.

* (Function) beforeSend - A pre-callback to modify the XMLHttpRequest object before it is sent. Use this to set custom headers in the request, for example. The XMLHttpRequest is passed as the only argument.

Return value: XMLHttpRequest


//Add hover capabilities
$('tbody > tr').bind('mouseenter mouseleave', function() {
$(this).toggleClass('hover');
});