Questions tagged [jquery-click-event]

The jQuery click event is a wrapper around the default browser "onclick" event.

The jQuery click event is basically a wrapper around the default browser "onclick" event. In jQuery, it provides the option to handle and trigger the mouse "onclick" event. The onclick event is being sent on an element when the mouse pointer is over that element, right after the mouse button is pressed and released.

Example

Binding click event handler

$("selector").click(function(){
  // do something
});
// Or
$("selector").on("click", function(){
  // do something
});

Reference

238 questions
0
votes
2 answers

jQuery .click() function called automatically

I have an event listener set up on a button using jQuery, and for some reason the function within the click listener is called without the button being clicked. I know that usually functions are anonymous in listeners, but it won't work as an…
0
votes
5 answers

How to remove click event on "this" object in jQuery

My DOM structure is as follows, ...... Binding click event as follows, $(document).on("click",".like",function(){ var selector = $(this); …
Mahesh.D
  • 1,691
  • 2
  • 23
  • 49
0
votes
1 answer

use jquery css to change image size on click

I've got an html table that contains videos and images in the list. If you click on any row it plays a video or shows the image in a div. I also have a size change link to adjust the size of the video or image when clicked.
Tom
  • 2,604
  • 11
  • 57
  • 96
0
votes
2 answers

jquery onclick setting variable

I set a variable 'api_key' on document load. I want to modify this variable with the text of an input field after clicking a button var api_key = ""; //my button has an id named "btn-verify", the input field has an id named…
CQM
  • 42,592
  • 75
  • 224
  • 366
0
votes
1 answer

Implementing click event for jquery bubble-popup

I'm trying to implement jquery-bubble-popup on my site however I'm completely stuck. I'm trying to do the following. If somebody clicks on a "report info" div a bubble pop up will show up pertaining to that report. I want to be able to change…
KingKongFrog
  • 13,946
  • 21
  • 75
  • 124
0
votes
1 answer

How can I keep the tree menu opened after click on the link? I´m using C#!

I've a tree menu. How can I keep this menu opened after click on the link, after postback? Obs: I´m using ASP.NET C# Could you pls help? jQuery(".menu li").on('click', function (e) { e.stopPropagation(); if…
Rodrigo Abib
  • 83
  • 1
  • 2
  • 14
0
votes
1 answer

i want to generate on click event as well as open a dialog box

My dialoge box works fine on clicking a button. but control not going to click event in .cs page
Shodhan Huli
  • 53
  • 1
  • 2
  • 10
0
votes
2 answers

jQuery: click function and ajaxy plugin

I am using balupton ajaxy plugin. I am trying to add a class on an element with on("click") function but due to the ajaxy plugin that handles the click function on the specific element , it doesn't work. I have this list:
0
votes
3 answers

jQuery select one value from a variable

I am new to jQuery and i have a problem about getting the value that i need from a variable. More specific I have this list on html file.
0
votes
1 answer

Enable and Disable the div to take click events on click of a div

I Have few divs in my code as shown below
swati
  • 129
  • 1
  • 18
0
votes
1 answer

jquery: on second click

i have a problem with toggle animation clicking - like when you click once and an element moves down and on the second click the element moves back up. I tried .toggle but with no success and come with this idea: I have a function that moves a…
dyb
  • 59
  • 8
0
votes
1 answer

Hover action gets inverted after click event at jQuery

I am using a system to highlight 2 columns when the cursor is over one of them. Then, the user can change the value from No to Yes inside each cell by clicking on it. When this happens, the hover action seems to works inverted. It acts when the…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
0
votes
4 answers

Focusout if not elements is clicked (see fiddle)

I have an "clear"-icon dynamically showing up in my input-field when I write something. Keypress and focus events handle that well, the only thing is that I want the icon to be removed when the input field is not in focus mode. The problem is that I…
oskarno
  • 126
  • 1
  • 2
  • 8
0
votes
2 answers

Input button event inside Grid not firing using JQuery

I have a input button inside my gridview. I am capturing the button's click event using jquery as bellow and running code behind (basically I am trying to implement the read-unread functionality of email): $('.toggleBtn').click(function(e) { …
Zaki
  • 5,540
  • 7
  • 54
  • 91