Questions tagged as 'click'

3
answers

How to create a click event that is only called when clicking off of a div?

I need to click on a div (it's a register), it will close. What selector should I use so that by clicking anywhere outside the div this div closes? $(????).on("click", function(){ $('div').hide(); }); If you click on any par...
asked by 07.03.2014 / 22:17
2
answers

Toggle text and class of a link when clicked - jQuery

I'm trying to delegate a click event to a link inside a table, as this jsFiddle sample shows : The result you can see is: By clicking the " Enable " link, the click event assigned to the .activate class is triggered,...
asked by 15.10.2015 / 06:04
2
answers

Click event gets lost on next page in pagination

I have developed a simple pagination page for my studies and am having a problem in the click event when I go to the next page. On the first page the event works but when I go to the next one the event seems to get lost. What can it be? Below...
asked by 25.08.2015 / 21:27
2
answers

Difference between 'click', 'bind', 'live', 'delegate', 'trigger' and 'on' functions?

I gave a searched but there is not a comparison list between the functions below: $().click(fn) $().bind('click', fn) $().live('click', fn) $().delegate(selector, 'click', fn) $().trigger('click') $().on('click', selector, fn); How do all...
asked by 28.09.2018 / 20:37
1
answer

Clicking on an element that triggers the click on another

I have 5 images on my Slide <li><img src="images/slide3.jpg" alt=""></li> <li><img src="images/slide2.jpg" alt=""></li> <li><img src="images/slide5.jpg" alt=""></li> <li&...
asked by 09.11.2014 / 09:14
1
answer

Is there any difference between codes A and B below?

Code A $('#tantoFaz').on('click', function() { /* ....... */ }); Code B $('#tantoFaz').click(function() { /* ....... */ });     
asked by 08.04.2017 / 00:55
2
answers

How to create events in a for loop structure?

My question is the following, I'm developing a program (I'm a beginner) in C #. The part I wanted to improve, is this: I'm wanting to create different events in a for structure. For example: public frmSelecaoDeCartas() { InitializeComponen...
asked by 06.10.2017 / 00:38
2
answers

on () and bind () are not working

I am using off() in an element to disable its functionality and need to enable it again with on() . But it is not working when on() is executed ... Here's the code, I'm trying to prevent a form from being sent 2 times when...
asked by 24.05.2014 / 20:03
3
answers

How to use the preventDefault function in a click event inside an iframe?

I manipulate the iframe's DOM as follows: ( link ) $('iframe').contents().find('a').função(); We usually use the preventDefault function like this: $( "a" ).click(function( event ) { event.preventDefault(); }); Doubt: How do I u...
asked by 13.12.2014 / 06:10
1
answer

Use the same click event for several buttons in C # WPF

I'm doing a C # project using WPF, which has many buttons. Is there any way to identify which button was clicked so that you do not need to click_event for each Button?     
asked by 19.10.2015 / 18:47