Showing posts with label events. Show all posts
Showing posts with label events. Show all posts

Sunday, June 10, 2012

How to find event listeners on a DOM node?


I have a page where some event listeners are attached to input boxes and select boxes. Is there a way to find out which event listeners are observing a particular DOM node and for what event?

Sunday, May 13, 2012

How to access the jQuery event object in a Seaside callback


Basically, I want to translate the following into Seaside Smalltalk:




$(".myDiv").bind('click', function(e) {
console.log(e);
});

Tuesday, May 1, 2012

how to check if there is already a click/event asociated to an element


lets say i have




function trigger(){

$('a.pep').each(function(){
$('a.pep').click(function(){
console.log($(this).val());
});
});
}
function push(){
$('body').append('<a class="pep">hey mate i have no trigger yet</a>');
trigger(); //now i do but the others have duplicated trigger
}
$(document).ready(function(){
$('a.push').click(function(){
push();
});
});

Monday, April 23, 2012

Browser window close event


I want to capture the browser window/tab close event. I have tried the following with jQuery:

Thursday, April 12, 2012

Is binding events in jQuery very expensive, or very inexpensive?


I just wrote a $().bind('event') function and then got concerned that this kind of a call might be very expensive if jQuery has to run through each element in the DOM to bind this event.

Friday, April 6, 2012

Click Entire Row (preserving middle click and ctrl+click)


I have an HTML table, with a link in the first column. I want to allow the user to click on anywhere in the row to activate that link. At the same time I would like to preserve the middle click and ctrl+click functionality of opening a new tab/window. Here is an example of the table:

Pass mouse events through absolutely-positioned element


I'm attempting to capture mouse events on an element with another absolutely-positioned element on top of it. Right now, events on the absolutely-positioned element hit it and bubble up to its parent, but I want it to be "transparent" to these mouse events and forward them on to whatever is behind it. How should I implement this?

Thursday, April 5, 2012

Performance difference between jQuery"s .live("click", fn) and .click(fn)


I love the new live event in jQuery 1.3. The question I have is the performance of this event. I know the advantages of using live over click/bind('click') but is there a performance hit for using it over click/bind('click')?

Attaching an event to multiple elements at one go


Say I have the following :




var a = $("#a");
var b = $("#b");

//I want to do something as such as the following :

$(a,b).click(function () {/* */}); // <= does not work

//instead of attaching the handler to each one separately

Thursday, March 8, 2012

GWT Custom Event Handler


Can someone give me an example of creating a custom set of an Event and a Handler. Say you have a Person object that you want your widgets to know if it got updated.

Tuesday, February 21, 2012

Tuesday, January 17, 2012

How can i get all calendar and its events from iphone app?


Good Day to you. I have used iCal events in my app. I have add events to iCal and retrieve/delete the events from iCal from my sample iPhone app. Now, i want to show all the calendars what are the calendars user synced in their iPhone(Eg : Google calendar). Then i want to retrieve the events from other calendars except iCal. How can i get all the synced calendars from iPhone? I searched my level best in Google but, can't to get right answer. Can you please help me? Thanks in advance.