Most voted "click" questions
In javascript, this is the capture of the mouse click event on a certain DOM element.
Learn more…57 questions
Sort by count of
-
8
votes3
answers7891
viewsHow to create a click event that is only called when clicking outside a div?
I need you to click off a div (is a registration screen), the same if close. What selector should I use so that clicking anywhere outside the div that div closes? $(????).on("click", function(){…
-
5
votes2
answers463
viewsToggle text and class of a link when clicked - jQuery
I’m trying to make the delegation an event click There is a link within a table, how this jsFiddle example shows: The result obtained as you can see, is: By clicking on the link "Activate", the…
-
4
votes2
answers257
viewsEvent click is lost on the next page in the pagination
I have developed a simple pagination page for my studies and am having a problem with the click event when I go to the next page. On the first page the event works but when I go to the next the…
-
3
votes1
answer1380
viewsClick 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"…
-
3
votes1
answer53
viewsIs there a difference between the codes A and B below?
Code A $('#tantoFaz').on('click', function() { /* ....... */ }); Code B $('#tantoFaz').click(function() { /* ....... */ });…
-
3
votes2
answers213
viewsDifference between click, bind, live, delegate, Trigger and on functions?
I did a search but there is a comparison list between the functions below: $().click(fn) $().bind('click', fn) $().live('click', fn) $().delegate(selector, 'click', fn) $().trigger('click')…
-
3
votes1
answer188
viewsHow to capture click event with mouse scroll?
My doubt is 'simple', but I can find no 'definitive' answer anywhere: You can specifically capture the mouse scroll click with JS? There is the function .click(), that I use a lot, but there is how…
-
2
votes2
answers163
viewson() and bind() are not working
I’m using off() in an element to disable its functionality and need to enable it again with on(). But it’s not working when on() is executed... Here’s the code, I’m trying to prevent a form from…
-
2
votes1
answer803
viewsClick event. Display message in current form and open new form
I need to make the event click a button located on a form, open another modal form. While the other form is loaded, I need to display a message to the user in a Statuslabel of a Statusstrip. (an msg…
-
2
votes1
answer712
views -
2
votes3
answers1139
viewsHow to use the preventDefault function in an event click in an iframe?
I manipulate the iframe DOM as follows: (http://api.jquery.com/contents/) $('iframe').contents().find('a').função(); We usually use the preventDefault function like this: $( "a" ).click(function(…
-
2
votes2
answers127
viewsJavascript does not take changed array before click
I have a click code: var layerMap = []; $(document).on('click', '#TipoMapa', function(){ console.log(layerMap); }); And I have a code that changes the variable layerMap: $(document).on('click',…
-
2
votes1
answer198
viewsDouble event on jQuery click
I am on time having problems with jQuery events. I have used all the best practices to stop the double event of click. Following are examples: .off() e.preventDefault(); e.stopPropagation();…
-
2
votes2
answers178
viewsHow to create events in a for repeat structure?
My question is the following, I am developing a program (I am beginner) in C#. The part I wanted to improve on is the following: I’m wanting to create different events in a for structure. For…
-
1
votes3
answers4496
viewsClick and hold the Button / Listview
How to program to click and hold down call a method other than just a normal click? I would like tips, tutorials something that can help me. I’m having a new problem using the Onitemclick method and…
-
1
votes1
answer923
viewsClick and hold on Listview
As I program to click and hold down call a method other than just a normal click in Listview? I would like tips, tutorials something that can help me. @Override public void…
-
1
votes1
answer438
viewsAuto click on button with Tampermonkey
I have a button on a site, which serves to thank, I would like to know how to make a script for Tampermonkey, and when the page is loaded, it performs this function of click on that button, based on…
-
1
votes3
answers2171
viewsJavascript function when clicking on any class="foo"
I have a calendar where every day is: <a class="dia" href="#">(Número do dia, ex: 1, 2, 3, etc)</a> Then I need that whenever the class "day" is clicked it calls a function, for example…
-
1
votes0
answers499
viewsHow to list download links by VBA
Hello! My problem is this... I am doing the access to a site, where I provide login and password and travel through the pages to my page of interest. I have a feature that always lists all links on…
-
1
votes1
answer604
viewsWhat alternative mode could be used to block the click effect on an HTML element?
Based on an example by Sergio - How to prevent a click on a link/anchor or tied event element Example of my own making var ancora = document.getElementsByClassName('baixar'); for (var i in ancora) {…
-
1
votes4
answers3766
viewsHow to create a clickable div?
I have a div on my site and want to make it clickable through Javascript. How do I do that? Thanks.
-
1
votes0
answers161
viewsEvent fired twice in Jquery click
I am on time having problems with jQuery events. I have used all the best practices to stop the double event of click. Following are examples: .off() e.preventDefault(); e.stopPropagation();…
-
1
votes1
answer138
viewsHow to reverse mouse click events?
Hit me a recent doubt, where the click of left button mouse could in a specific case become the right, and vice versa. Code var menulist = document.oncontextmenu; var menu = function(ev) { if…
-
1
votes0
answers25
viewsA web element is clicked but no action is performed (Android)
sorry for the language, but so I’ll be more direct I’m having a problem, I find the (mobile) element in a real device, point to it and click, but always returns the error message…
-
1
votes1
answer1252
viewsMacro Vba - IE... Click, Not Working button
I can’t click a button that generates an Excel report (then it opens that "File Download" button "Want to save? Open? Cancel? but this part is quiet, I think, if it’s not let me know and if you…
-
1
votes1
answer1543
viewsDouble Click Android
I’m developing an app that has a list in a RecyclerView and the idea is that the person chooses one or more products from that list and changes color to show that it is selected, but in case the…
-
1
votes0
answers169
viewsclick jquery does not work on firefox
Good morning, after the code that fills the table, click handling does not work on firefox, but works on Chrome, someone has some light, please? function carregarItens(){ //variáveis var itens = "",…
-
1
votes0
answers19
viewsEvent mouseover and onclick event for the same set of elements
Guys, how can I make my mouseover and click, work for a set of elements, in my case an img and two Labels: Image Test <style> .imgImportacao{ width: 150px; margin-top: 10px; margin-left:…
-
0
votes0
answers970
views -
0
votes1
answer48
viewsaddClass() to an object via an external link
I need to create a click() function for 8 links that are in one pagina X, each link will take me to a specific slide in a pagina Y. Slide is active when it is with Class selected, then my idea is…
-
0
votes1
answer1616
viewsHow to use the power button on your phone?
I wonder if it is possible to use the power button (on and off) of the phone in an application. Example: Performing some function if pressed the button three times in a row. If possible I would like…
-
0
votes1
answer202
viewsAfter filtering content, jQuery does not work
I made a code listing database items with PHP (using data-id for jQuery to "read" the click), but when filtering the items using Ajax, click stops working. PHP while ($furni =…
-
0
votes1
answer764
viewsHow to get value and id within TD?
I have three action links within the TD of a Table. How do I get (in Jquery) the value and id when clicking on one of the links? Follow the code below: var dados = [ ['Banana', '10,00'], ['Maça',…
-
0
votes1
answer1276
viewsTake the column values of the clicked row and pass inputs
Here is the function to take the table row value, and pass to inputs, if I take the lines that were loaded from the error database but when, insert a new item into the table, then I take the value…
-
0
votes2
answers158
viewsHow to block the double click on a video?
I created a page with a video set in the resolution and layout I want, but when receiving a double click it enters mode fullscreen, I’d like to disable that. I used the script: <script>…
-
0
votes1
answer46
viewsOpenlayers 4: mouse click to draw a point, make mouse stick to the screen and causes the drag of the map
Hello, I am studying the development of a map with the help of Openlayers 4, watching video lessons, I am at the stage where I created a routine with 3 buttons (Pan, Draw, Erase) to draw on the map.…
-
0
votes1
answer400
viewsClick and act, click again and return to position/ Jquery
I made a button to open a configuration screen, when I click open the screen, and the button changes from "Setup" for "Come back", until then beauty, but I would like that when it clicked again,…
-
0
votes1
answer118
viewsHow do I switch a class of buttons that trigger a player to appear and hide?
I have 3 buttons in Link format with the classes: . icon-play, . icon-pause and . icon-download, I want to change the play class with pause, as well as the reverse without influencing the download…
-
0
votes0
answers104
viewsgive Focus() or click() in a webview text field C#
I am developing a webbrowser in UWP(windows universal application) using the C#language, to assign value to a text field that is in webview I used the following script: string functionString =…
-
0
votes1
answer203
viewsReact Native only works with 2 clicks
In this code, the function only works after being called twice. ubernehmen = () => { this.setState({wert: ((this.state.cor*208)+(this.state.letra*8)}) this.setState({werta:…
-
0
votes2
answers119
viewsHow to expand a two elements simultaneously with Javascript?
I need to expand two elements. Both have the same class css. The name of class for expansion is .fechado a. One is in the element .accordion-seta and another in .accordion-sinal. It would be…
-
0
votes1
answer312
viewsClick as if it were toggle or Hover
I’m having a problem with something similar to a legacy tooltip, what happens is that they did it in Hover this way: var elem = jQuery('#interrogacao_adicionar_cartao_div');…
-
0
votes1
answer562
viewsSwap ngb-tabset tabs by clicking on button
I have two tabs and I need to change tabs by clicking on a button. I usually work with routes, but in this case I need to change tab only, on the same web page. I have the following Tabs, TAB 1 and…
-
0
votes1
answer181
viewsStore incremented value within a Jquery click function
I have the following function. $('#proximo').click(function() { token = localStorage.getItem("userToken"); page =0; var e = document.getElementById("idSelecionaSize"); var size =…
-
0
votes1
answer104
viewsI click the button and do not add the div - C# Asp.Net
I click the button and it does not add me to div, but sends it to the database, someone can help me? C# protected void img_btn_enviar_nome_Click(object sender, EventArgs e) { UtilizadoresBot…
-
0
votes0
answers77
viewsHow to disable the click event on "Date Range Picker" days?
I’m trying to stop the "click" event on each day of the Daterangepicker, I’m just trying to stop users from changing the period. I created a thumb drive in Codepen, follow link:…
-
0
votes2
answers143
viewsRun function after object created by click
Below is what I managed to do: When I click on a button with the class .btn-comprar-na-pagina, it fires function below. $(function () { var itens = []; $(document).on("click",…
-
0
votes1
answer90
viewsHow to use . click on jQuery after return from ajax
I have an ajax function that returns content with a button. I would like to call another function triggered by the button that the ajax returned, as in the example below: <button id="procurar"…
-
0
votes0
answers20
viewsActivate Button without Clicking
I’d be grateful if you could help me. I need the function of a button (which is to trigger the chronometer of a task) to be executed without clicking on a date, or when changing the status of a…
-
0
votes1
answer29
viewsHow to make jquery click work with Infinite Scroll?
I have the homepage with a list of things: <table id="table" class="tabela" > <thead> <tr> <th class="check">V</th> <th class="nivel">N</th> <th…