Posts

Showing posts from August, 2012

Featured Post

Jquery event.data and is default prevented

Returns: Anything event.data The optional data passed to jQuery.fn.bind when the current executing handler was bound. Example The description of the example. $("a").each(function(i) { $(this).bind('click', {index:i}, function(e){ alert('my index is ' + e.data.index); }); });event.isDefaultPrevented() Returns: Boolean .event.isDefaultPrevented() Returns whether event.preventDefault() was ever called on this event object. Example Checks whether event.preventDefault() was called. $("a").click(function(event){ alert( event.isDefaultPrevented() ); // false event.preventDefault(); alert( event.isDefaultPrevented() ); // true });

Jaquery current target event

The current DOM element within the event bubbling phase. This property will typically be equal to the this of the function. If you are using jQuery.proxy or another form of scope manipulation, this will be equal to whatever context you have provided, not event.currentTarget Example Alert that currentTarget matches the `this` keyword. $("p").click(function(event) { alert( event.currentTarget === this ); // true });

Jquery undelegate event

Returns: jQuery .undelegate() .undelegate(selector, eventType) selector A selector which will be used to filter the event results. eventType A string containing a JavaScript event type, such as "click" or "keydown" .undelegate(selector, eventType, handler) selector A selector which will be used to filter the event results. eventType A string containing a JavaScript event type, such as "click" or "keydown" handler A function to execute at the time the event is triggered. .undelegate(selector, events) selector A selector which will be used to filter the event results. events A map of one or more event types and previously bound functions to unbind from them. .undelegate(namespace) namespace A string containing a namespace to unbind all events from. Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements. Undelegate is a way of removing event h...

Undelegate jquery

Returns: jQuery .undelegate() .undelegate(selector, eventType) selector A selector which will be used to filter the event results. eventType A string containing a JavaScript event type, such as "click" or "keydown" .undelegate(selector, eventType, handler) selector A selector which will be used to filter the event results. eventType A string containing a JavaScript event type, such as "click" or "keydown" handler A function to execute at the time the event is triggered. .undelegate(selector, events) selector A selector which will be used to filter the event results. events A map of one or more event types and previously bound functions to unbind from them. .undelegate(namespace) namespace A string containing a namespace to unbind all events from. Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements. Undelegate is a way of removing event h...

Jquery unbind event

Returns: jQuery .unbind([eventType], [handler(eventObject)]) eventType A string containing a JavaScript event type, such as click or submit. handler(eventObject) The function that is to be no longer executed. .unbind(eventType, false) eventType A string containing a JavaScript event type, such as click or submit. false Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). .unbind(event) event A JavaScript event object as passed to an event handler. Remove a previously-attached event handler from the elements. Any handler that has been attached with .bind() can be removed with .unbind(). In the simplest case, with no arguments, .unbind() removes all handlers attached to the elements: $('#foo').unbind(); This version removes the handlers regardless of type. To be more precise, we can pass an event type: $('#foo').unbind('click'); By specifying the click event type, only handlers for that event typ...

Jquery trigger handler

Returns: Object .triggerHandler(eventType, extraParameters) eventType A string containing a JavaScript event type, such as click or submit. extraParameters An array of additional parameters to pass along to the event handler. Execute all handlers attached to an element for an event. The .triggerHandler() method behaves similarly to .trigger(), with the following exceptions: The .triggerHandler() method does not cause the default behavior of an event to occur (such as a form submission). While .trigger() will operate on all elements matched by the jQuery object, .triggerHandler() only affects the first matched element. Events created with .triggerHandler() do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing. Instead of returning the jQuery object (to allow chaining), .triggerHandler() returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns undefined For m...

Jquery trigger event

Returns: jQuery .trigger(eventType, extraParameters) eventType A string containing a JavaScript event type, such as click or submit. extraParameters Additional parameters to pass along to the event handler. .trigger(event) event A jQuery.Event object. Execute all handlers and behaviors attached to the matched elements for the given event type. Any event handlers attached with .bind() or one of its shortcut methods are triggered when the corresponding event occurs. They can be fired manually, however, with the .trigger() method. A call to .trigger() executes the handlers in the same order they would be if the event were triggered naturally by the user: $('#foo').bind('click', function() { alert($(this).text()); }); $('#foo').trigger('click'); As of jQuery 1.3, .trigger()ed events bubble up the DOM tree; an event handler can stop the bubbling by returning false from the handler or calling the .stopPropagation() method on the even...

Jquery proxy event

Returns: Function jQuery.proxy(function, context) function The function whose context will be changed. context The object to which the context (this) of the function should be set. jQuery.proxy(context, name) context The object to which the context of the function should be set. name The name of the function whose context will be changed (should be a property of the context object). Takes a function and returns a new one that will always have a particular context. This method is most useful for attaching event handlers to an element where the context is pointing back to a different object. Additionally, jQuery makes sure that even if you bind the function returned from jQuery.proxy() it will still unbind the correct function if passed the original. Example Demo Enforce the context of the function using the "function, context" signature. Unbind the handler after first click. Test

Java mail Sending program

This summary is not available. Please click here to view the post.