Skip to content
Advertisement

Tag: events

Dragging multiple layers in JavaScript with KineticJS

I’m trying to synchronize dragging of multiple layers. Example here: http://jsfiddle.net/e8Z3a/ The problem is the sync is missing some events. After doing a series of short drags, the mustache layer stays behind, as if it was missing some events on the way. My observation leads to a guess, that fast dragging works. I mean if you grab the image without

Capture events in list

I would like to know how to capture events within the dropdown list when a user click on a “select” dropdown list. I would like for example to intercept events when different elements of list are on focus. I tried to tie event listeners to the option elements of the list but they do not capture anything. See sample code

Using AppMobi and Events

I am new to the new AppMobi world, so can you please help me. I have created an image object and have drawn it to the stage. My problem is that I want to add an event to object. I have set the image using: And I have drawn it to stage: Now I want to add an event to

Removing event listener which was added with bind

In JavaScript, what is the best way to remove a function added as an event listener using bind()? Example The only way I can think of is to keep track of every listener added with bind. Above example with this method: Are there any better ways to do this? Answer Although what @machineghost said was true, that events are added

Bind Ready Function and Resize Event

In jQuery, is it possible to somehow “bind” an action to both the ready function and a resize event? I’m trying to add/remove classes on resize and I want the initial class state to be there on ready. Answer The easiest way to do this is to trigger the resize event immediately after binding it:

Make an iFrame trigger the body.onclick event

I have a script that attaches a function to be triggered by the the document.onclick event. The problem is that the page has an iframe in it. When the user clicks on the iframe, the document.onclick event does not trigger the function attached to it. Is there any way to fix this? In rare cases, the iframe may have another

Advertisement