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
3
votes
1 answer

on "tap, click" event firing twice. how to avoid it?

I'm trying to make an image with area tags where I can click on each area and show an alert. With both "tap & click" included, I can't seem to figure out how to avoid firing the event twice on desktop mode using a mouse…
Peter W
  • 75
  • 1
  • 8
3
votes
1 answer

jQuery trigger('click') Not Working in Chrome

I previously had the following $('#refresh').click(function () { $('#fileUpload').trigger('click'); }); However I've changed it so it should fire on a query parameter function getParameterByName(name) { name = name.replace(/[\[]/,…
pee2pee
  • 3,619
  • 7
  • 52
  • 133
3
votes
1 answer

Conditional Disable / Re-Enable jQuery click event

I've got a problem with disabling and re-enabling click events on links. The setup is 4 columns in a row, each column containing a link and hidden content box. When you click a link, it expands the row and displays content box specific to that…
Ryan Palmer
  • 405
  • 2
  • 9
  • 26
3
votes
2 answers

how to find the siblings of parent using jquery

in my case am having a two html elements covered by a another element(grand parent) like this here tabs is a grand parent and…
user1999510
3
votes
1 answer

displaying custom modal on clicking a table row

I want to create custom modal. Basically, I have a table which has rows in it. When the user clicks on a row, I want a pop-up window to appear. I am following the description of how to create a custom modal in this link:…
Stranger
  • 864
  • 4
  • 21
  • 48
3
votes
4 answers

Twitter Bootstrap checkbox-button value changed after click event

I have a checkbox-button-group like this:
3
votes
1 answer

jQuery: How to detect if an element is not clicked?

I'd like to know if it is possible to detect if an element is not clicked. This is the code I have: $("#mpElement").myFeature({ ......... ......... ......... afterDo: function() { // This if-else…
user1448031
  • 2,172
  • 11
  • 44
  • 89
3
votes
3 answers

Does jQuery overwrite event listeners?

I've got a bunch divs which each contain a remove link attached with the click event below: var observeRemoveRoom = function $('.remove_room').click(function(){ $(this).parent().removeClass('active'); }); } Clicking it…
digitalWestie
  • 2,647
  • 6
  • 28
  • 45
3
votes
1 answer

Jeditable and .live() Suppress first Click

I have jeditable fields that are updated by AJAX so am using .live() in conjunction with Jeditable to be able to persistantly bind the jeditable fields after AJAX update. However by using live() it suppresses the first 'click' and it is the second…
AdamYii
  • 33
  • 3
2
votes
2 answers

Django Jquery: based on selection, display further selection options

A user has to select a vehicle type, then based on his selection he then has options of selecting a vehicle model, then based on that selection he will have the option of viewing specific colours available for that model. There are separate django…
2
votes
6 answers

Can you 'click' loaded content in jQuery?

I am trying to create a page where the example div is clickable, as it would be below. However I'm trying to make it so if the user clicks the logo it will reload the original content using load. After this load has occurred is it possible to…
Dan
  • 11,914
  • 14
  • 49
  • 112
2
votes
1 answer

Knockoutjs click binding on parent prevents submit of child form

Check out this jsfiddle. There is a
with a click binding. This div has a child form. Clicking the submit button on the child form fires the parent click event, and does not submit the form. How can I restore the ability to submit this form?…
Will
  • 1,893
  • 4
  • 29
  • 42
2
votes
4 answers

Click event is not firing after DOM changes in jQuery

I am trying to code ADD & DELETE button in HTML page to delete or add images code in the page. The DELETE button will delete the first image before the button. The ADD button will insert a new image to HTML page and the delete button to the…
usef_ksa
  • 1,669
  • 3
  • 23
  • 40
2
votes
1 answer

Event not happen with a not

I have a datatable , on each row I have a delete button. If user click on a row but not delete column, I would like to do delete event... otherwise edit My js code $("#vehicleTable tbody tr td :not('.delete')").on('click', function () { …
robert trudel
  • 5,283
  • 17
  • 72
  • 124
2
votes
1 answer

jquery click event fires for the first time but fails second time.It works when page refreshes

Im opening a div on click of another div.Below code seems to be working only for the first time. It works when page refreshes. Close event always get called but click event does not fire. $('.redirection-list .redirection a').on('click',…
user9326447
  • 99
  • 3
  • 9
1 2
3
15 16