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
3 answers

jquery from to data

I have a list of divs, which what I want to achieve is when user clicks on column , it gets the data square assigns it to variable from, and when again click on another column it assigns the data to variable to. I do know how to send values to php…
0
votes
2 answers

jquery click() + load() doesn't work with Opera?

I have made a jQuery/javascript that is loading a page into a div when clicking on a picture. It works for IE, Firefox, Chrome but NOT Opera.. I can't figure out why it isn't working.. Please take a look on this page and click on a product to see…
Joakim Eriksson
  • 89
  • 1
  • 10
0
votes
4 answers

Using .live('click') inside a .click() function triggers itself

I'm trying to add a $('body').live('click') listener after the user clicks on a div. The purpose is creating a custom dropdown box that the user can open and eventually close by clicking anywhere on the page. But when I add .live() or .bind()…
podcastfan88
  • 970
  • 2
  • 13
  • 28
-1
votes
3 answers

JQuery clearing all text boxes

I have a question. I am trying to clear the text fields of a form once a button is clicked. This is the HTML for the input type: This is my Jquery code: $("#clear_entries").click( …
javaperson
  • 109
  • 1
  • 12
-1
votes
1 answer

Click event doesn't work on Ajax loaded content

Can somebody see what I'm missing? I've been stuck on this for a while now. I've got a ajax post which dynamically loads products.content.php into my page. I want to bind a click event to a button which is created through this post, but I can only…
Display name
  • 523
  • 1
  • 6
  • 12
-1
votes
4 answers

Why the alert pop-up is not coming in following scenario?

I'm having a hyperlink and upon clicking on it I want to show tha alert pop-up but it's not working. Can anyone tell me where I'm doing wrong? jsfiddle Following is my HTML Code: QUE414 Following is my jQuery…
PHPLover
  • 1
  • 51
  • 158
  • 311
-1
votes
1 answer

jQuery click() each() unique?

I want to have multiple span.play without IDs which can be clicked and play some audio file. Problem: Display the duration on only the current file $(this) $('.play').each(function() { $(this).append('
Martin
  • 2,007
  • 6
  • 28
  • 44
-2
votes
2 answers

jQuery .is() - $(...).is(...).click does not return object, what does?

.is() does not return an object: $("div").children().is(".result").click(function () { ... } ); I receive the error: Uncaught TypeError: $(...).is(...).click is not a function Is there a function that does the same thing as .is() but returns an…
Chad
  • 1,531
  • 3
  • 20
  • 46
-2
votes
2 answers

jquery click event only works once

I've been researching this all morning and am missing something. Here is the basic setup and code:
mweb202
  • 91
  • 2
  • 6
-3
votes
1 answer

Javascript/JQuery function not triggered after .load

When a user clicks the "search" button in my ASP.NET application, a temporary "spinner" div is loaded. Then when the search (finally) completes, the contents of the spinner div are replaced by the HTML returned by the SubmitSearch…
aBlaze
  • 2,436
  • 2
  • 31
  • 63
-3
votes
3 answers
-4
votes
1 answer

How to get id attribute of clicked tr button element?

I'm binding a click event to buttons created dynamically in a table of class .lada-button. In the current setup creating a reference to the button using a class selector Ladda.create( document.querySelector( '.ladda-button' ) ); triggers the submit…
Brian Var
  • 6,029
  • 25
  • 114
  • 212
-4
votes
2 answers

jQuery - click event in and after another click event

I want to activate a click event only after another click event has occurred. Here is my current code : $('#mydiv').click(function(){ //some code $('body').click(function(e){ if($(e.target).is('#mydiv2'))return; //some code …
Amin
  • 35
  • 1
  • 7
1 2 3
15
16