event-bubbling

yui bubling library

I am trying to figure out how to create dependencies between panel 3 and panel 4 at http://bubbling-library.com/themes/bubbling/jscripts/yui-cms/examples/accordion/yui-collapsable-panel.html. Can anyone explain how the dependencies are created? ...

Does performance of an event handler depends on the number of child elements

I've got a single mousedown event handler on a table with dynamically increasing number of rows (right now over thousand, in perspective should have been unlimited) and I observe a drop down in performance as the number of preloaded rows increases. The purpose of event handler is simple - figure out which row was clicked and highlight it...

WPF: Handling bubbling events only from one specific content

Now I'm about to learn RoutedEvents. I understand bubbling and tunneling and all. But I have a little problem I'm not sure how to handle. I've got a ItemsControl in my own defined UserControl ( inherits TabItem ). This itemsControl could be a ListBox or some selector not decided yet ( depends what is best with this solution ). Now when...

JQuery and event bubbling... AGAIN.

I am roughly working with the following: var i; var k = 5; $('document').ready(function () { $('#someElement').click(function (e) { e.stopImmediatePropagation(); i++; if (i >= k) { my_function(); }); } }); my_function() { alert(i); $('#myDisplay').text("You have clicked on '#so...

Weird Bubbling Issue

I'm not sure why this is bubbling, but it is. Wondering if anyone has any ideas? $('#file_upload').live('submit',function(event){ $('#file_upload').attr('action','io.cfm?action=updateitemfile&item_id='+$('.agenda-modal').attr('data-defaultitemid')); $('iframe').load(function(){ $('.upload_output').empty(); ...

Event bubbling for parent of <a>, which returns false from onclick event listener

I try to make a common solution for the following task: onclick event listener for element <a href="#">Some text</a> must return false. It can stop page scrolling after click. $("a[href='#']").bind("click", function () { return false; }); It can stop scrolling but "return false" stop bubbling too! So, if I have the following cod...

jQuery - Click on LI, show/hide UL - Click on LI:a href, continue to show UL and open in Blank Window

Hello all, Thanks to the wonderful contributors here at SO! jQuery is much cooler when you begin to understand it. :) So I have an LI that when clicked shows/hides a child UL. What I would like to do is have the ability to click on an link inside the LI that opens a blank window, but also doesn't close the child UL. The blank window ope...

how to use event bubbling cancellation

Hi All I've looked everywhere for a code on how to stop event bubbling to occur, and I've found one from the Quirksmode website, which is this: function doSomething(e){ if(!e) var e = window.event; e.cancelBubble = true; if(e.stopPropagation) e.stopPropagation(); } But I don't know how and where to use it. What is the 'e'...

capture click on div surrounding an iframe

How can i capture a click or mousedown event on a div surrounding an iframe. I've tried attaching the funciton to click event on the div but since the iframe never bubbles the event up to the surrounding div the function is never called. Is there a way i can capture the event on the div and then propagate it to the iframe for default act...

Preventing bubbling after loading?

Hello. I've a huge problem. I'm having a div named "#box" that loads external content after clicking links in it: $("#box a").click( function(e) { e.preventDefault(); var hash = this.parentNode.hash; $("#boxLoaded").load('boxFiles/'+ hash.substring(1) +'.html'); $("#box").fadeOut(100); $("#boxLoaded").fadeIn(200);...

stopPropagation() not stopping event bubbling?

jsFiddle I'm using a jQuery plugin that allows the user to draw boxes in an area. I've put a dropdown list in the box that appears when the users lets go of the mouse button. The problem is, when you try to click on the dropdown list to select an option, another box is drawn. I've tried to use the following code to stop the click event ...

Bubbling an event triggered by disabled element

The question is: should the disabled element produce an event that will be triggered on its parent(s)? <div id="test"> <button disabled="disabled">Click me</button> </div> <script type="text/javascript"> document.getElementById("test").onclick = function() { alert("Clicked!"); }; </script> All browsers except IE prevent the even...

How to disable some element reaction to any mouse event without interrupting underlaying element events in jQuery?

Hi. I'm trying to make a simple pop-up <div> that's designed to show mouse coordinates while a user is dragging a mouse pointer. This pop-up appears at the bottom on the right to the mouse pointer. The underlaying div has its own very important mouse event handlers (e.g. .mousemove()). The pop-up div is quite far away from the mouse poi...