Questions tagged [stoppropagation]

stopPropagation is a method of the event object that prevents further propagation of the current event.

stopPropagation is a method of the event object that prevents further propagation of the current event. This prevents ancestors of the current node from receiving the event.

392 questions
0
votes
0 answers

Stop request of anchor tag on click using jquery/javascript

I have an anchor tag with href="http://www.abc.com/page/1" attribute.It is an anchor link of a pagination feature. When I click on this anchor, by default 'www.abc.com/page/1' gets loaded. Now I want to disable this request using…
Aakash Sahai
  • 3,935
  • 7
  • 27
  • 41
0
votes
3 answers

How to detect specific element in jQuery event propagation

I've a notifications window (absolutely positioned div) and I want it to close when clicking everything outside that window. I tried:
Notifications...
Click for…
kbitdn
  • 33
  • 1
  • 5
0
votes
1 answer

jquery hover and click events returning multiple objects

I have various elements with the same class. I want to have events for all of the elements but i only want to gather information from the first element like so: elements[i].before = css($(elements[i].handle).first()); When I hover over the elements…
Jimmyt1988
  • 20,466
  • 41
  • 133
  • 233
0
votes
2 answers

How to trigger click event only for the clicked-on layer and not its parent too

Fiddle I can of course take the .inner layer out of .main layer and then use absolute position against another wrapper i.e .outer layer to place it in the same position and this will stop it from triggering .main click event. but I was wondering if…
LaserBeak
  • 3,257
  • 10
  • 43
  • 73
0
votes
2 answers

javascript, event propagation, and input fields

So I have an input field, that when you goto interact with it with the mouse, it basically wont work. This is because: The input is created after load by expanding that item in edit mode To expand the item, we use a click event on an li, which is a…
Horse
  • 3,023
  • 5
  • 38
  • 65
0
votes
1 answer

Stop event on keyup in mootools doesn't work

I'm trying to prevent non-numeric characters being entered in a text field. My code validates the characters but doesn't stop it being added to text box. My code: var isNumberKey = function(e){ //alert(e.which); if (e.which > 31 && (e.which…
KoolKabin
  • 17,157
  • 35
  • 107
  • 145
0
votes
1 answer

jQuery: mouseenter/mouseleave even stop propagation

I'm using mouseenter and mouseleave events in jquery on an unordered list's
  • to show some image when the mouse goes over them. Here's what that list typically looks like:
  • 0
    votes
    2 answers

    Stop parent event jquery

    I want to stop the parent event to fire up when I click the child link. here it is my code: $('.list_row_inputtype').on('click',function(event) { $(this).find('a.link_to_fire').click(); event.stopPropagation(); return…
    0
    votes
    3 answers

    jquery live click event stopPropagation

    I have a dropdown menu which contains a input and several buttons. The dropdown should hide when I click one of the buttons or somewhere else, but don't hide when keypress on the input. I use the following code, it doesn't work. Though it works when…
    Jensen
    • 1,653
    • 4
    • 26
    • 42
    0
    votes
    2 answers

    How is this function parameter undefined?

    I'm trying to replicate this 'onclickout simulator' script as seen here: http://jsfiddle.net/C9CL3/ As you can see, it works fine (in all of the browsers I've tested it in - so this isn't a browser compatibility issue as far as I'm aware). The code…
    user1017882
    0
    votes
    2 answers

    event.stopPropagation(); doesn't behave as expected

    I read couple articles related to event.stopPropagation(); but none of the solutions provided works for me. Basically what I have is an accordion widget with all the elements collapsed by default. On each element header (dt tag) there is also a…
    0
    votes
    1 answer

    How to get links to work when using stopPropagation on parent div

    I have a modal popup with several links inside that have the :confirm and :method => :delete options. The problem is I am using stopPropagation to prevent the modal from closing when a user clicks inside the div content…
    chourobin
    • 4,004
    • 4
    • 35
    • 48
    -1
    votes
    1 answer

    stopPropagation sometimes doesn't

    I am trying to do three things: prevent auto focus of input on mobile prevent the webpage from moving on mobile allow touch movement on
    -1
    votes
    1 answer

    stopPropagation(); doesnt work to stop top of this child div

    problem between parent and child DIV. when u click on child div will show up same as parent div. i want child div not follow parent div action. i tried stopPropagation() is not work or maybe im confuse. html code:
    user453089
    • 719
    • 2
    • 13
    • 23
    -1
    votes
    2 answers

    Do I need e.stopPropagation() and e.preventDefault()?

    In JavaScript/jQuery, I am registering click and touchstart events on a button, with this: $('#open-about-popup').on('touchstart click', openAboutPopup_eventHandler) Then in the event-handler, I have this: e.stopPropagation();…
    Talal
    • 103
    • 3
    • 10
    1 2 3
    26
    27